Skip to content

Add set -eu to all files#148

Open
whitphx wants to merge 2 commits intogoodtft:masterfrom
whitphx:set-eu
Open

Add set -eu to all files#148
whitphx wants to merge 2 commits intogoodtft:masterfrom
whitphx:set-eu

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