Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop passing default args for unsupported args #18

Open
alaasdk opened this issue Jan 23, 2023 · 1 comment
Open

Stop passing default args for unsupported args #18

alaasdk opened this issue Jan 23, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@alaasdk
Copy link

alaasdk commented Jan 23, 2023

All default values for all args got passed to the Skaffold command, thus some of the commands fails with some of these arguments..

ex.
diagnose or deploy fails when receives --cache-file argument and exit with code 127 with error "unknown flag: --cache-file"

root@docker-desktop:/Users/myuser/myrepo# ./bin/skaffold deploy --cache-file=/Users/myuser/myrepo/.skaffold/cache --filename=skaffold.yaml --verbosity=warning
unknown flag: --cache-file
See 'skaffold deploy --help' for usage.

A solution would be extracting all available args from --help and match it with passed+default values, something like...

const command_help = await exec(Binaries.SKAFFOLD, command, '--help')
const argsRegex = /(--\S+|-[a-zA-Z]),?\s?(\S+)?: (.+)/gm;
@vladyslavvolkov vladyslavvolkov self-assigned this Feb 5, 2023
@vladyslavvolkov vladyslavvolkov added the enhancement New feature or request label Feb 5, 2023
@wonderstim
Copy link

I am also running into this issue with or without the cache: false configured.

      - name: Run Skaffold Production Rendering
        uses: hiberbee/[email protected]
        with:
          command: render
          profile: production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants