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

Add support for windows environments using mingw and/or cygwin. #53

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JokinenK
Copy link

Needs a review and testing with Mac

Copy link
Member

@tovrleaf tovrleaf left a 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 Show resolved Hide resolved
ad-aws-login.sh Outdated

while read -r path; do
while read -r browser; do
if [[ -f "${path}/${browser}" ]]; then
Copy link
Member

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

Copy link
Author

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.

Copy link
Member

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

ad-aws-login.sh Outdated Show resolved Hide resolved
ad-aws-login.sh Show resolved Hide resolved
function open_browser() {
local os=$(read_os)

read browser browser_path < <(find_browser)
Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

None yet

2 participants