Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to override default shell #372

Open
adrian-gierakowski opened this issue Jan 27, 2020 · 1 comment
Open

how to override default shell #372

adrian-gierakowski opened this issue Jan 27, 2020 · 1 comment

Comments

@adrian-gierakowski
Copy link

The shell function doesn't seem to respect the $SHELL env var or my current users default shell, it always runs /bin/sh. Fox example, running:

#! /usr/bin/env nix-shell
#! nix-shell -i runghc -p "ghc.withPackages (x: [ x.turtle ])"

{-# LANGUAGE OverloadedStrings #-}

import Turtle

main = do
  shell "echo $SHELL" empty
  shell "dscl . -read ~/ UserShell" empty
  shell "echo $0" empty

prints the following:

/nix/store/7b6xw0kh049s12j2sqbhdv3n6ma11c91-bash-interactive-4.4-p23/bin/bash
UserShell: /usr/local/bin/fish
/bin/sh

Do you know how the underlying System.Process.shell determines which shell to use?

@Gabriella439
Copy link
Owner

@adrian-gierakowski: I believe it is hard-coded in Haskell's process library (which is what turtle uses under the hood). So if you think it should respect $SHELL then you might need to open an issue against that package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants