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

Fix the issue2187 #2234

Merged
merged 1 commit into from
Jan 21, 2021
Merged

Fix the issue2187 #2234

merged 1 commit into from
Jan 21, 2021

Conversation

xauthulei
Copy link
Contributor

No description provided.

@xauthulei
Copy link
Contributor Author

I am try to address the issue #2187, @bmpotter , Could you review this here, thanks

@xauthulei
Copy link
Contributor Author

Review comments from @bmpotter in PR2216

This isn't quite right. The effect of && -d $DIR is that if the user specified -f

flag (which sets DIR) but the specified didn't exist or was a file, it would silently not use it (confusing the user).

You have 2 choices:

  1. Just remove && -d $DIR from all of the lines you added it to. This will cause pushd to display an error msg if the directory is not valid.

  2. Or do number 1 and add a check in checkPrereqsAndInput that the directory specified is valid, and display an error msg and return exit code 1 if not.

The fact that you didn't catch this problem makes me think you didn't test your code thoroughly enough before submitting the PR. Please test both the good path and the error cases. Thx.

@xauthulei xauthulei mentioned this pull request Jan 11, 2021
@bmpotter bmpotter self-requested a review January 12, 2021 12:14
agent-install/edgeNodeFiles.sh Outdated Show resolved Hide resolved
Signed-off-by: leileihu <leileihu@cn.ibm.com>
@bmpotter bmpotter merged commit 44f0bd3 into open-horizon:master Jan 21, 2021
@xauthulei xauthulei deleted the issue_2187 branch January 22, 2021 01:14
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