Server $PATH doesn't update during orchestration

Ross Kilgariff's Avatar

Ross Kilgariff

05 Nov, 2015 04:48 PM


I'm setting up an orchestration script that installs some binaries on an Ubuntu 14.04 server in a non-standard location and updates the PATH environment variable.

The idea is that the binaries should be runnable in subsequent scripts without having to specify the full path.

The problem I'm seeing is that PATH reverts to its previous value after the first script exits, and even `export PATH=$PATH` doesn't seem to make the new value stick.

Is there anything I can do to make sure scripts correctly pick up the new value of $PATH without modifying every script in the chain?


  1. Support Staff 1 Posted by Marat Komarov on 10 Nov, 2015 10:54 AM

    Marat Komarov's Avatar

    export PATH=$PATH sets environment only for current process. You need to set environment variables globally, and there are several ways to do it with a different pitfalls. So extending $PATH in each script is not a bad idea though.

  2. Marat Komarov closed this discussion on 22 Dec, 2015 05:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

02 Jul, 2019 07:54 PM
07 Jun, 2019 07:12 PM
02 May, 2019 04:04 PM
28 Mar, 2019 05:24 PM
22 Feb, 2019 08:11 PM