Skip to content

Commit

Permalink
attempt to handle nvm as well as asdf in preaction script
Browse files Browse the repository at this point in the history
  • Loading branch information
brainbicycle committed Jan 28, 2025
1 parent a7a592f commit 054e1b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Artsy.xcodeproj/xcshareddata/xcschemes/Artsy.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "export KEYSFILE=keys.shared.json&#10;&#10;ASDF_BREW_PREFIX=/opt/homebrew/opt/asdf/&#10;. &quot;$ASDF_BREW_PREFIX/libexec/asdf.sh&quot;&#10;&#10;&quot;${SRCROOT}/../node_modules/react-native-keys/keysIOS.js&quot;&#10;">
scriptText = "export KEYSFILE=keys.shared.json&#10;&#10;# Try nvm first &#10;[ -z &quot;$NVM_DIR&quot; ] &amp;&amp; export NVM_DIR=&quot;$HOME/.nvm&quot;&#10;&#10;if [[-s &quot;$HOME/.nvm/nvm.sh&quot;]]; then&#10;. &quot;$HOME/.nvm/nvm.sh&quot;&#10;elif [[ -x &quot;$(command -v brew)&quot; &amp;&amp; -s &quot;$(brew --prefix nvm)/nvm.sh&quot; ]]; then&#10;. &quot;$(brew --prefix nvm)/nvm.sh&quot;&#10;fi&#10;&#10;# Check for asdf&#10;if [ -f &quot;/opt/homebrew/opt/asdf/libexec/asdf.sh&quot; ]; then&#10; . &quot;/opt/homebrew/opt/asdf/libexec/asdf.sh&quot;&#10; echo &quot;Using Node via asdf&quot;&#10;elif [ -f &quot;/usr/local/libexec/asdf.sh&quot; ]; then&#10; . &quot;/usr/local/libexec/asdf.sh&quot;&#10; echo &quot;Using Node via asdf&quot;&#10;# Check for nvm&#10;elif [ -f &quot;$HOME/.nvm/nvm.sh&quot; ]; then&#10; . &quot;$HOME/.nvm/nvm.sh&quot;&#10; nvm use default &gt; /dev/null&#10; echo &quot;Using Node via nvm&quot;&#10;else&#10; echo &quot;Neither asdf nor nvm found! Please install one of them to use Node.js.&quot;&#10; exit 1&#10;fi&#10;&#10;&quot;${SRCROOT}/../node_modules/react-native-keys/keysIOS.js&quot;&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
Expand Down

0 comments on commit 054e1b5

Please sign in to comment.