mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 13:27:10 -07:00
feat(ci): Prevent test runs outside of container
It's not safe, we write and delete files all over the place!
This commit is contained in:
parent
a0aa142288
commit
5c886dcd1c
2 changed files with 8 additions and 1 deletions
|
@ -2,6 +2,10 @@ require_relative '../step_definitions/setup'
|
|||
require_relative '../step_definitions/corner_cases.rb'
|
||||
|
||||
BeforeAll do
|
||||
if ENV.fetch('RUNNING_IN_CONTAINER', false) != 'yessir'
|
||||
Kernel.abort("We don't seem to be running in a container; aborting for safety!")
|
||||
end
|
||||
|
||||
run_bash_command('sdk update')
|
||||
end
|
||||
|
||||
|
@ -12,7 +16,6 @@ After do |scenario|
|
|||
_restore_install
|
||||
end
|
||||
|
||||
# Uninstall all SDKMAN! candidates
|
||||
AfterAll do
|
||||
Dir["#{ENV['HOME']}/.sdkman/candidates/*/*"].each do |candidate_dir|
|
||||
_uninstall_candidate_version(candidate_dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue