mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
Check for 7-zip before build
This commit is contained in:
parent
168958ce2b
commit
6126437762
@ -47,6 +47,17 @@ def get_file project, query
|
||||
end
|
||||
end
|
||||
|
||||
def find_on_path exe
|
||||
path = ENV['PATH'].split(File::PATH_SEPARATOR)
|
||||
for dir in path
|
||||
if File.exists?(File.join(dir, exe))
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
puts '
|
||||
______ _ _ _ _ _
|
||||
| ___ \ (_) | | (_) | |
|
||||
@ -58,6 +69,11 @@ ______ _ _ _ _ _
|
||||
|___/
|
||||
'
|
||||
|
||||
unless find_on_path('7z.exe')
|
||||
puts '7z.exe not found. Ensure 7-zip is installed and on the PATH.'
|
||||
exit(1)
|
||||
end
|
||||
|
||||
puts 'Cleanup'
|
||||
|
||||
if Dir.exists?('vendor')
|
||||
|
Loading…
Reference in New Issue
Block a user