Add more better error handling
I mean I guess it died but that's still bad
This commit is contained in:
parent
5484c4fec6
commit
60420623cc
@ -226,12 +226,15 @@ step_preexecute() {
|
||||
[ -n "$_optdryrun" ] && return 0
|
||||
# Execute a user rc if it exists
|
||||
[ -r "$HOME/.firestarterrc" ] && . "$HOME/.firestarterrc"
|
||||
[ -n "$FIRESTARTER" ] && [ "$FIRESTARTER_DISPLAY" == "$DISPLAY" ] error "Firestarter is already running on $DISPLAY: $FIRESTARTER" 55
|
||||
[ -n "$FIRESTARTER" ] && [ "$FIRESTARTER_DISPLAY" == "$DISPLAY" ] && error "Firestarter is already running on $DISPLAY: $FIRESTARTER" 55
|
||||
export FIRESTARTER="$BASHPID"
|
||||
export FIRESTARTER_DISPLAY="$DISPLAY"
|
||||
export XDG_CURRENT_DESKTOP="${XDG_CURRENT_DESKTOP:-firestarter}"
|
||||
# Create required directories
|
||||
for dir in $_optconfigdir $_optdatadir $_optrundir $_optlogdir; do
|
||||
if [ -z "$dir" ]; then
|
||||
error "A required directory was not provided" 41
|
||||
fi
|
||||
if ! mkdir -p "$dir"; then
|
||||
error "Failed to create critical directory: $dir" 41
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user