diff --git a/acceptance/bundle/exec/basic/output.txt b/acceptance/bundle/exec/basic/output.txt index c1be99c9e..01d3479f0 100644 --- a/acceptance/bundle/exec/basic/output.txt +++ b/acceptance/bundle/exec/basic/output.txt @@ -4,3 +4,6 @@ hello, world >>> [CLI] bundle exec -- pwd [TMPDIR] + +>>> [CLI] bundle exec -- echo --help +--help diff --git a/acceptance/bundle/exec/basic/script b/acceptance/bundle/exec/basic/script index 48d20c1bd..fb07fbfb6 100644 --- a/acceptance/bundle/exec/basic/script +++ b/acceptance/bundle/exec/basic/script @@ -1,3 +1,6 @@ trace $CLI bundle exec -- echo "hello, world" trace $CLI bundle exec -- pwd + +# The CLI should not parse the --help flag and should pass it as is to echo. +trace $CLI bundle exec -- echo --help diff --git a/cmd/bundle/exec.go b/cmd/bundle/exec.go index acf914f59..39224955a 100644 --- a/cmd/bundle/exec.go +++ b/cmd/bundle/exec.go @@ -13,29 +13,6 @@ import ( "github.com/spf13/cobra" ) -// TODO: test that -- works with flags as well. - -// TODO: Can bundle auth be resolved twice? What about: -// databricks bundle exec -t foo -- databricks jobs list -t bar? -// OR -// databricks bundle exec -- databricks jobs list -t bar? -// OR -// databricks bundle exec -- databricks jobs list? -// OR -// databricks bundle exec -t foo -- databricks jobs list? -// -// For the first two, undefined behavior is fine. For the latter two we need to ensure -// that the target from exec is respected. -// -// Add tests for all four of these cases. -// --> Do I need similar tests for --profile as well? -// --> Also add test for what happens with a default target? - -// TODO: Add acceptance test that flags are indeed not parsed by the exec command and -// instead are parsed by the child command. - -// # TODO: Table test casing the profile flag permutations - func newExecCommand() *cobra.Command { execCmd := &cobra.Command{ Use: "exec", @@ -150,8 +127,5 @@ Examples: }, } - // TODO: Is this needed to make -- work with flags? What does this option do? - // execCmd.Flags().SetInterspersed(false) - return execCmd }