-
Notifications
You must be signed in to change notification settings - Fork 826
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
Install Amplify CLI on Windows Github Actions Fails: The term 'install.cmd' is not recognized as a name of a cmdlet #13664
Comments
Hi @ykethan, thanks for your response. This issue is different and is on installing awscli on windows host github action. I did resolved this using different way (as shown in workflow below) to install. However, this curl command "curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && install.cmd", which is in amplify documentation to install awscli on windows always fails with error I mentioned in issue above. No issues if we need to close this as I have resolved but if there is attention needed to the curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && install.cmd", this can be kept opened.
|
@dkliss thank you for the information. I was able to reproduce this on a Github action. I was able to get this working by using the following - name: Install AWS CLI
run: |
curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && ./install.cmd Marking this as documentation improvements. |
Thank you @ykethan. I have verified this and the the updated command works as epected.
|
@dkliss glad to hear, just a quick observation on your script it appears the Amplify CLI is being installed twice, with once with curl and once with npm. |
Hi @ykethan Yes, I just noticed and I changed the script to below but it failed with error shown. The original script above works. Not sure if this is something to do with "-g" or global flag in "npm install -g @aws-amplify/cli". Also, will the curl command install both awscli as well as aws-amplify cli? I needed to run commands such as "aws configure set" following this script and hence I need both aws and aws-amplify cli.
Failed as below:
|
How did you install the Amplify CLI?
curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && install.cmd
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
12.10.1
What operating system are you using?
runs-on: windows-latest
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
"No manual changes made"
Describe the bug
I run below workflow but the curl command fails with error. Is there something else to be done aport from running curl for windows?
"The term 'install.cmd' is not recognized as a name of a cmdlet, function, script file, or executable program. | Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
Expected behavior
I expect below to work for Windows host in GitHib Actions.
curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o install.cmd && install.cmd
Reproduction steps
Run above workflow with curl.
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: