Skip to content

Commit

Permalink
Fix CI (Kernel#exit always exits with 0 code, chrome runner exits wit…
Browse files Browse the repository at this point in the history
…h 0 if chrome wasn't started). (#1807)
  • Loading branch information
iliabylich committed Apr 20, 2018
1 parent b6bf799 commit dbec19c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
@@ -1,6 +1,6 @@
language: ruby

sudo: false
sudo: required

dist: trusty

Expand Down Expand Up @@ -95,6 +95,9 @@ before_install:
- which google-chrome-stable
- google-chrome-stable --version
- export RUBYOPT=-w
# Wokraround from https://github.com/travis-ci/travis-ci/issues/9024#issuecomment-356282802
- sudo chown root /opt/google/chrome/chrome-sandbox
- sudo chmod 4755 /opt/google/chrome/chrome-sandbox

script:
- "bundle exec rake $RUN"
Expand Down
1 change: 1 addition & 0 deletions lib/opal/cli_runners/chrome.rb
Expand Up @@ -73,6 +73,7 @@ def run_chrome_server
rescue Timeout::Error
puts 'Failed to start chrome server'
puts 'Make sure that you have it installed and that its version is > 59'
exit(1)
ensure
Process.kill('HUP', chrome_pid) if chrome_pid
end
Expand Down
2 changes: 1 addition & 1 deletion opal/corelib/kernel.rb
Expand Up @@ -191,7 +191,7 @@ def exit(status = true)
status = 0
} else if (status.$$is_boolean) {
status = status ? 0 : 1;
} else if (status.$$is_numeric) {
} else if (status.$$is_number) {
status = status.$to_i();
} else {
status = 0
Expand Down

0 comments on commit dbec19c

Please sign in to comment.