diff --git a/CHANGELOG.md b/CHANGELOG.md index 2248ba51..95348935 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## Next Release + +* Make the temporary directory path used by spring contain the UID of the process + so that spring can work on machines where multiple users share a single $TMPDIR. + ## 1.4.3 * Support new binstub format and --remove option diff --git a/lib/spring/env.rb b/lib/spring/env.rb index e1e9656f..6a60f0ae 100644 --- a/lib/spring/env.rb +++ b/lib/spring/env.rb @@ -33,7 +33,7 @@ def version end def tmp_path - path = Pathname.new(File.join(ENV['XDG_RUNTIME_DIR'] || Dir.tmpdir, "spring")) + path = Pathname.new(File.join(ENV['XDG_RUNTIME_DIR'] || Dir.tmpdir, "spring-#{Process.uid}")) FileUtils.mkdir_p(path) unless path.exist? path end