Skip to content

Commit

Permalink
[sb2] Check if default mode for target exists, error out earlier
Browse files Browse the repository at this point in the history
Doing so exits with a clearer error message then errors about sb2d
failing to start later such as these:

Runtime-Error loading /tmp/sb2-bidar-20240329-145433.AwoNRb/lua_scripts/init.lua (...dar-20240329-145433.AwoNRb/lua_scripts/argvenvp_misc.lua:28: bad argument #1 to 'files' (/tmp/sb2-bidar-20240329-145433.AwoNRb/wrappers.sdk-build: No such file or directory))
sb2: Error: startup of sb2d failed.

Tested-by: Björn Bidar <bjorn.bidar@jolla.com>
  • Loading branch information
Thaodan committed Nov 24, 2024
1 parent bb5b1cf commit 92afc22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/sb2
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ load_configuration()
exit_error "Cannot access target root '$SBOX_TARGET_ROOT', aborting."
fi

if [ ! -d "$SBOX_DIR/share/scratchbox2/modes/$SBOX_MAPMODE" ]; then
exit_error "Configure mode doesn't '$SBOX_MAPMODE' for target doesn't exist, aborting."
fi

LD_LIBRARY_PATH=$saved_LD_LIBRARY_PATH

# resolve possible symlinks in SBOX_TARGET_ROOT and SBOX_TOOLS_ROOT
Expand Down

0 comments on commit 92afc22

Please sign in to comment.