Skip to content

Commit a4a9959

Browse files
committed
Remove existing_tempdir stuff here too
1 parent fa5f1e2 commit a4a9959

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/octocatalog-diff/util/scriptrunner.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,18 @@ class ScriptRunner
1515
# For an exception running the script
1616
class ScriptException < RuntimeError; end
1717

18-
attr_reader :script, :script_src, :logger, :stdout, :stderr, :exitcode, :existing_tempdir
18+
attr_reader :script, :script_src, :logger, :stdout, :stderr, :exitcode
1919

2020
# Create the object - the object is a configured script, which can be executed multiple
2121
# times with different environment varibles.
2222
#
2323
# @param opts [Hash] Options hash
2424
# opts[:default_script] (Required) Path to script, relative to `scripts` directory
2525
# opts[:logger] (Optional) Logger object
26-
# opts[:existing_tempdir] (Optional) An existing temporary directory (helpful when parallelizing)
2726
# opts[:override_script_path] (Optional) Directory where a similarly-named script MAY exist
2827
def initialize(opts = {})
2928
@logger = opts[:logger]
3029
@script_src = find_script(opts.fetch(:default_script), opts[:override_script_path])
31-
@existing_tempdir = opts[:existing_tempdir]
3230
@script = temp_script(@script_src)
3331
@stdout = nil
3432
@stderr = nil
@@ -95,7 +93,7 @@ def log(priority, message, logger = @logger)
9593
# @return [String] Path to tempfile containing script
9694
def temp_script(script)
9795
raise Errno::ENOENT, "Script '#{script}' not found" unless File.file?(script)
98-
temp_dir = OctocatalogDiff::Util::Util.temp_dir('ocd-scriptrunner', existing_tempdir)
96+
temp_dir = OctocatalogDiff::Util::Util.temp_dir('ocd-scriptrunner')
9997
temp_file = File.join(temp_dir, File.basename(script))
10098
File.open(temp_file, 'w') { |f| f.write(File.read(script)) }
10199
FileUtils.chmod 0o755, temp_file

0 commit comments

Comments
 (0)