projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix test regexp.
[arvados.git]
/
lib
/
cmd
/
cmd.go
diff --git
a/lib/cmd/cmd.go
b/lib/cmd/cmd.go
index 51bcf55c76040e1f8c3a1320fcf7ab50db2090c6..b7d918739b86de347b0960e785bbd27dea477fba 100644
(file)
--- a/
lib/cmd/cmd.go
+++ b/
lib/cmd/cmd.go
@@
-2,7
+2,7
@@
//
// SPDX-License-Identifier: Apache-2.0
//
// SPDX-License-Identifier: Apache-2.0
-//
p
ackage cmd helps define reusable functions that can be exposed as
+//
P
ackage cmd helps define reusable functions that can be exposed as
// [subcommands of] command line programs.
package cmd
// [subcommands of] command line programs.
package cmd
@@
-65,6
+65,11
@@
type Multi map[string]Handler
func (m Multi) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
_, basename := filepath.Split(prog)
func (m Multi) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
_, basename := filepath.Split(prog)
+ if i := strings.Index(basename, "~"); i >= 0 {
+ // drop "~anything" suffix (arvados-dispatch-cloud's
+ // DeployRunnerBinary feature relies on this)
+ basename = basename[:i]
+ }
cmd, ok := m[basename]
if !ok {
// "controller" command exists, and binary is named "arvados-controller"
cmd, ok := m[basename]
if !ok {
// "controller" command exists, and binary is named "arvados-controller"