Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3370383
D6532.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6532.diff
View Options
diff --git a/nix/dev-shell.nix b/nix/dev-shell.nix
--- a/nix/dev-shell.nix
+++ b/nix/dev-shell.nix
@@ -137,8 +137,6 @@
${../scripts}/install_homebrew_macos.sh
${../scripts}/install_homebrew_deps.sh watchman
-
- ${../scripts}/prompt_direnv_macos.sh
'' + ''
# Render default configuration for keyserver
diff --git a/scripts/install_nix.sh b/scripts/install_nix.sh
--- a/scripts/install_nix.sh
+++ b/scripts/install_nix.sh
@@ -121,6 +121,11 @@
# Ask user if they would like to use Powerline for bash prompt
SCRIPT_DIR=$(cd "$(dirname "$0")" || true; pwd -P)
+
+if [[ "$OSTYPE" == 'darwin'* ]]; then
+ "$SCRIPT_DIR"/prompt_direnv_macos.sh
+fi
+
# Build the nixified script which is aware of Powerline and dependencies
nix build "$SCRIPT_DIR"'/..#better-prompt'
# Source file to apply Powerline bootstrap logic
diff --git a/scripts/prompt_direnv_macos.sh b/scripts/prompt_direnv_macos.sh
--- a/scripts/prompt_direnv_macos.sh
+++ b/scripts/prompt_direnv_macos.sh
@@ -21,7 +21,7 @@
# `test -t` tests if a file descriptor is open, 0 being stdin
# Normally, a non-interactive shell will not have 0 FD bound
# However, Buildkite still has 0 FD bound, so check if PS1 is empty
-if [[ ! -t 0 ]] || [[ -z "${PS1-}" ]]; then
+if [[ ! -t 0 ]]; then
exit 0
fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 2:23 AM (20 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2587360
Default Alt Text
D6532.diff (1 KB)
Attached To
Mode
D6532: [Nix] Only prompt for direnv usage on install
Attached
Detach File
Event Timeline
Log In to Comment