-
Notifications
You must be signed in to change notification settings - Fork 55
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
Commands write to STDERR stream even when the command succeeds #397
Comments
Hey Ashok, Thanks for your feature request, the current CLI experience is by design - ask-cli expects users to rely on the exit code to decide if the command execution is succeeded or not, and we use stderr for informative messages. But we didn't realize that this behavior should break the programmatic usage of the CLI. We will look at the example you provided, and try to provide a reasonable solution soon. |
Hey @ashokm checking back to this issue - sorry for waiting long - the warning message comes from https://github.com/alexa/ask-cli/blob/develop/lib/commands/smapi/smapi-command-handler.js#L146-L148 where the pattern is This is a common scenario, and I think we can add a environmental variable to control the on and off of the hint display. Proposing
|
Also checked through the codebase for similar case, where It turns out this case is the only case. Thus I think for now we can just deal with this case specifically, instead of introducing a general |
Adding a general |
Hey @ashokm thanks for this request~ we will take your feedback when we revisit our logger class. Consider the header.location is the only warning message that CLI outputs, let's use the environment variable for now. Once similar pattern happens, we will definitely considering how to avoid showing warning messages. We will checkin the code and will also do a routine release by end of month for this feature. Thanks for your feedback~ |
@sjcomstock67 we should prioritize this quick fix for customers. |
Adding a general |
Closing this in favor of #432 as the pipeline failure fix has been released with the environment variable change. |
I'm submitting a...
Problem
We have an issue with the ask-cli breaking our CI/CD pipelines. It is due to
[Warn]
logs being written to STDERR.We use the Alexa Skills Kit (ASK) CLI and the Alexa Skill Management API (SMAPI) command in our pipelines.
Although the command executes successfully, our pipeline task fails with:
We have attempted to debug this to see what is being written to STDERR by adding the following to the end of the command, which will prepend "STDERROR: " to each line sent to STDERR.
This results in us seeing
According to the documentation (https://developer.amazon.com/en-US/docs/alexa/smapi/ask-cli-command-reference.html) we see the following information:
This seems to be the issue. This additional debug message is written to STDERR, which is causing our pipeline task to fail as anything written to STDERR is seen as an error.
How can we resolve this? Are there any options we/you can add to the ASK CLI to not write this additional debug message to STDERR?
Note that this was also an issue with the Azure CLI (see Azure/azure-cli#10856) and they resolved this for users by adding in a
--only-show-errors
option.Please advise us on what we can do to resolve this.
Request
If writing
[Warn]
logs to STDERR is the expected behavior for the ask-cli, can you consider adding an option to disable warnings being written to STDERR?Your Environment and Context
The text was updated successfully, but these errors were encountered: