Skip to content

Commit

Permalink
Fix issue noteflakes-music#69 by creating a user-specific scratch dir…
Browse files Browse the repository at this point in the history
…ectory
  • Loading branch information
Arjen Bax committed Apr 5, 2019
1 parent cca29b7 commit 1741354
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/lyp/base.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
require 'fileutils'
require 'etc'

module Lyp
USER = Etc.getlogin
WINDOWS = Gem.win_platform?
TMP_DIR = WINDOWS ? "#{Dir.home}/AppData/Local/Temp" : "/tmp"
TMP_ROOT = "#{TMP_DIR}/lyp"
TMP_ROOT = "#{TMP_DIR}/lyp-#{USER}"
FileUtils.mkdir_p(TMP_ROOT)

# A package specifier is of the form <package>@<version specifier>, where
Expand Down

0 comments on commit 1741354

Please sign in to comment.