Skip to content

Commit ec2f1c0

Browse files
Qionglin Daiphilstrong
authored andcommitted
remove reletive path from Linux extract_zip method
1 parent 91590f2 commit ec2f1c0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/instance_agent/platform/linux_util.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,8 @@ def self.extract_tar(bundle_file, dst)
5151
def self.extract_zip(bundle_file, dst)
5252
log(:debug, "extract_zip - dst : #{dst}")
5353
FileUtils.mkdir_p(dst)
54-
working_dir = FileUtils.pwd()
5554
absolute_bundle_path = File.expand_path(bundle_file)
56-
FileUtils.cd(dst)
57-
execute_zip_command("unzip -qo #{absolute_bundle_path}")
58-
FileUtils.cd(working_dir)
55+
execute_zip_command("unzip -qo #{absolute_bundle_path} -d #{dst}")
5956
end
6057

6158
def self.extract_tgz(bundle_file, dst)

0 commit comments

Comments
 (0)