ARMmbed / yotta_osx_installer

OS X single click yotta application. Makes using yotta on OS X painless
Apache License 2.0
4 stars 4 forks source link

sanitize the environment before launching? #1

Open autopulated opened 9 years ago

autopulated commented 9 years ago

When launching yotta.app, the terminal seems to inherit environment variables (specifically, PROMPT_COMMAND). This breaks things because .bashrc isn't sourced by the yotta shell, so my prompt command prints errors each time I run a command:

(yotta workspace) ~ $ yotta --version
0.8.3
sh: update_terminal_cwd: command not found
sh: setPrompt: command not found
sh: abbrvPwd: command not found
sh: setTitle: command not found
(yotta workspace) ~ $ 

(setPrompt, abbrvPwd, setTitle are all defined in my .bashrc)

BlackstoneEngineering commented 8 years ago

What would you suggest as a fix? How would you "clean" the terminal before launching?

autopulated commented 8 years ago

I think unset PROMPT_COMMAND.

Although possibly this is just a bug in the way I'm setting up these functions – is there anything unusual about the way the shell is launched?

BlackstoneEngineering commented 8 years ago

The entire setup is unusual, though nothing specific to munging the environment variables. I am overriding the PS1 variable to guarantee a consistent user interface across machines.