Skip to content

Commit 45801bc

Browse files
committed
get_env
1 parent bddf5ed commit 45801bc

File tree

1 file changed

+2
-4
lines changed
  • modules/post/multi/manage

1 file changed

+2
-4
lines changed

modules/post/multi/manage/zip.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ def initialize(info={})
3131
end
3232

3333
def get_program_file_path
34-
@program_file_path ||= lambda {
35-
session.sys.config.getenvs("ProgramFiles")['ProgramFiles']
36-
}.call
34+
get_env('ProgramFiles')
3735
end
3836

3937
def has_7zip?
@@ -48,7 +46,7 @@ def vbs(dest, src)
4846

4947
def upload_exec_vbs_zip
5048
script = vbs(datastore['DESTINATION'], datastore['SOURCE'])
51-
tmp_path = "#{session.sys.config.getenvs('TEMP')['TEMP']}\\zip.vbs"
49+
tmp_path = "#{get_env('TEMP')}\\zip.vbs"
5250
print_status("VBS file uploaded to #{tmp_path}")
5351
write_file(tmp_path, script)
5452
cmd_exec("wscript.exe #{tmp_path}")

0 commit comments

Comments
 (0)