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

CMD scripts not recognized, despite present in PATH #1774

Closed
1 task done
kenorb opened this issue Jul 30, 2018 · 3 comments
Closed
1 task done

CMD scripts not recognized, despite present in PATH #1774

kenorb opened this issue Jul 30, 2018 · 3 comments

Comments

@kenorb
Copy link

kenorb commented Jul 30, 2018

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options
git version 2.18.0.windows.1
cpu: x86_64
built from commit: cd1a74fc9dc8a07626c216940db9a51f25206e03
sizeof-long: 4
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.15063]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
$ cat /etc/install-options.txt
Editor Option: VIM
Path Option: CmdTools
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: LFOnly
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
$ echo $SHELL
/usr/bin/bash
$ aws --version
bash: aws: command not found
  • What did you expect to occur after running these commands?
$ aws.cmd --version
aws-cli/1.15.65 Python/3.6.0 Windows/10 botocore/1.10.64
  • What actually happened instead?

The aws command cannot be found.


Basically aws command doesn't exist, but aws.cmd does. The command works in other terminals such as Hyper, CMD or PowerShell.

I believe the problem is that this shell doesn't look for scripts with .cmd extension.

See:

$ whereis aws
C:\Program Files\Amazon\AWSCLI\bin\aws.cmd
$ aws
bash: aws: command not found
$ echo $PATH | egrep ":[^:]+AWS[^:]+:" -o
:/c/Program Files/Amazon/AWSCLI/bin:
$ ls /c/Program\ Files/Amazon/AWSCLI/bin
aws.cmd
@dscho
Copy link
Member

dscho commented Aug 3, 2018

Is the same issue present in MSYS2? If so, this issue might be better reported to https://github.com/Alexpux/MSYS2-packages, as it would be an MSYS2 Bash issue.

@marekadare
Copy link

I ran into the same Problem.
The .cmd files are not recognized by bash because they are windows "commands".

I then installed python and pip to install awscli and it worked for me (https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html#awscli-install-windows-pip)

However I can't get aws-cli to prompt for a MFA Token when I connect to AWS because git-bash has issues to execute python.

I hope this helps :)

@dscho
Copy link
Member

dscho commented Nov 28, 2018

Is the same issue present in MSYS2?

As this question is still unanswered, I see myself forced to close this ticket without further attempts at resolving the issue.

@dscho dscho closed this as completed Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants