-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for windows environments using mingw and/or cygwin. #53
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've started good work! This would be highly requested. Too mad it (still) breaks the existing functionality for OSX. Requesting changes :)
ad-aws-login.sh
Outdated
|
||
while read -r path; do | ||
while read -r browser; do | ||
if [[ -f "${path}/${browser}" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work in OSX. ${path}/${browser} is a directory, not a file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added original method back in addition to the file based testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be a bit cleaner by using OR in one statement, instead of having two duplicate if-statements in a row
function open_browser() { | ||
local os=$(read_os) | ||
|
||
read browser browser_path < <(find_browser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what happens:
browser="Google"
browser_path="Chrome /Applications"
should be instead:
browser="Google Chrome"
browser_path="/Applications"
This will not work since read command assumes spaces for token separators.
Needs a review and testing with Mac