Skip to content
This repository was archived by the owner on May 12, 2018. It is now read-only.

Commit 1fb44f7

Browse files
author
Valeriy Trubachev
committed
configurable path for build script
this is to fix builds on systems where /tmp is mounted with noexec
1 parent 43096a2 commit 1fb44f7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/build.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ def initialize(data)
2828
end
2929

3030
def run
31-
@run_file = Tempfile.new("executor")
31+
FileUtils.mkdir_p(config.jobs_dir) unless File.exists?(config.jobs_dir)
32+
33+
@run_file = Tempfile.new("executor", config.jobs_dir)
3234
@run_file.chmod(0700)
3335

3436
@commands.unshift(checkout_cmd)

lib/config.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ def builds_dir
2929
@builds_path ||= File.join($root_path, 'tmp', 'builds')
3030
end
3131

32+
def jobs_dir
33+
@jobs_path ||= File.join($root_path, 'tmp', 'jobs')
34+
end
35+
3236
def write(key, value)
3337
@config[key] = value
3438

0 commit comments

Comments
 (0)