Skip to content

Commit

Permalink
add --no-corepack argument
Browse files Browse the repository at this point in the history
  • Loading branch information
schlawg committed Dec 11, 2024
1 parent f0cd00a commit e2475ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ui/.build/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const args: Record<string, string> = {
'--no-color': '',
'--no-time': '',
'--no-context': '',
'--no-corepack': '',
'--help': 'h',
'--watch': 'w',
'--prod': 'p',
Expand Down Expand Up @@ -46,6 +47,7 @@ Options:
--no-color don't use color in logs
--no-time don't log the time
--no-context don't log the context
--no-corepack don't use corepack to install pnpm (protect or restricted system node installs)
Exclusive Options: (any of these will disable other functions)
--clean-exit clean all build artifacts and exit
Expand Down
6 changes: 5 additions & 1 deletion ui/build
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ fi

cd "$(dirname "${BASH_SOURCE:-$0}")/.build"

corepack enable
if [[ " $* " != *" --no-corepack "* ]]; then
if ! corepack enable >/dev/null 2>&1; then
echo "Corepack not available. Try a userland node such as nvm."
fi
fi

pnpm install --silent --ignore-workspace

Expand Down

0 comments on commit e2475ee

Please sign in to comment.