Skip to content

Stop passing default args for unsupported args #18

@alaasdk

Description

@alaasdk

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;

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions