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 set -eu to all files #148

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

Add set -eu to all files #148

wants to merge 2 commits into from

Conversation

whitphx
Copy link

@whitphx whitphx commented Jul 5, 2019

Thank you for the great work.

I added set -eu to all the shell scripts.
By setting this, the script stops when some error occurs during execution and when undefined variable is used.
(See https://explainshell.com/explain?cmd=set+-ue )

I think this could be helpful as the scripts are currently new and have some troubles.
Actually, by this, I could prevent rebooting at the end of script when some error occurs during execution.

@goodtft
Copy link
Owner

goodtft commented Jul 18, 2019

Thank you for your requests,But I think the set -eu command should be used conservatively.If you increase the set -eu command, when the command is executed, it returns non-zero, the script will immediately exit, then the error message will not be displayed.

@goodtft
Copy link
Owner

goodtft commented Jul 18, 2019

Thank you for the great work.

I added set -eu to all the shell scripts.
By setting this, the script stops when some error occurs during execution and when undefined variable is used.
(See https://explainshell.com/explain?cmd=set+-ue )

I think this could be helpful as the scripts are currently new and have some troubles.
Actually, by this, I could prevent rebooting at the end of script when some error occurs during execution.

@goodtft goodtft closed this Jul 18, 2019
@goodtft
Copy link
Owner

goodtft commented Jul 18, 2019

Thank you for the great work.

I added set -eu to all the shell scripts.
By setting this, the script stops when some error occurs during execution and when undefined variable is used.
(See https://explainshell.com/explain?cmd=set+-ue )

I think this could be helpful as the scripts are currently new and have some troubles.
Actually, by this, I could prevent rebooting at the end of script when some error occurs during execution.

@goodtft goodtft reopened this Jul 18, 2019
@goodtft
Copy link
Owner

goodtft commented Jul 18, 2019

Thank you for the great work.

I added set -eu to all the shell scripts.
By setting this, the script stops when some error occurs during execution and when undefined variable is used.
(See https://explainshell.com/explain?cmd=set+-ue )

I think this could be helpful as the scripts are currently new and have some troubles.
Actually, by this, I could prevent rebooting at the end of script when some error occurs during execution.

I don't know why do you want to change it to "type fbcp > /dev/null 2>&1 && :"

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.

2 participants