Skip to content

Commit

Permalink
fixes found during manual testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed May 27, 2020
1 parent 4a3e43c commit f574ac2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/lib/autoinstall/script.rb
Expand Up @@ -66,7 +66,7 @@ def to_hash
}
end

def log_dir
def logs_dir
Yast::AutoinstConfig.logs_dir
end

Expand All @@ -91,6 +91,9 @@ def script_path

# Downloads or writes down script file
def create_script_file
# ensure path are available
Yast::SCR.Execute(Yast::Path.new(".target.mkdir"), File.dirname(script_path))
Yast::SCR.Execute(Yast::Path.new(".target.mkdir"), logs_dir)
if !location.empty?
url = Yast::URL.Parse(location)
res = get_file_from_url(
Expand Down Expand Up @@ -304,7 +307,7 @@ def logs_dir
if chrooted
super
else
File.join(Yast::AutoinstConfig.destdir, Yast::AutoinstConfig.logsdir)
File.join(Yast::AutoinstConfig.destdir, Yast::AutoinstConfig.logs_dir)
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/modules/AutoinstScripts.rb
Expand Up @@ -220,7 +220,7 @@ def Write(type, special)
return true if !Mode.autoinst && !Mode.autoupgrade

target_scripts = @scripts.select { |s| s.class.type == type }
target.scripts.select! { |s| s.chrooted == special } if type == "chroot_scripts"
target_scripts.select! { |s| s.chrooted == special } if type == "chroot-scripts"

target_scripts.each(&:create_script_file)

Expand Down

0 comments on commit f574ac2

Please sign in to comment.