Skip to content

Commit

Permalink
Make spawned process inherit from user shell profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Mangel committed Aug 21, 2023
1 parent d9616d2 commit 25344a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Fable.Cli/Util.fs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,10 @@ module Process =
psi.EnvironmentVariables.[key] <- value
psi.WorkingDirectory <- workingDir
psi.CreateNoWindow <- false
psi.UseShellExecute <- false
// This is needed in order to load the users profile
// For example, on OSX Python is installed as python3
// and user often alias it to python in their profile
psi.UseShellExecute <- true

This comment has been minimized.

Copy link
@inosik

inosik Aug 22, 2023

Contributor

This breaks the runSyncWithOutput function, which admittedly is not used at the moment.

UseShellExecute = true doesn't allow redirecting stdin/stdout/stderr.

This comment has been minimized.

Copy link
@MangelMaxime

MangelMaxime Aug 22, 2023

Member

Good catch, I forgot about this fact...

Hum after re-doing my python installation with pyenv, I don't need the alias python=python3 anymore.

So we could revert this change.

But if runSyncWithOutput is not used should we ?

This comment has been minimized.

Copy link
@MangelMaxime

MangelMaxime Aug 22, 2023

Member

I finally decided to revert this commit we can always revisit it if others have problem and they can't fix their installation.

psi.RedirectStandardOutput <- redirectOutput

// TODO: Make this output no logs if we've set silent verbosity
Expand Down

0 comments on commit 25344a2

Please sign in to comment.