Skip to content

Commit

Permalink
Add Support For Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul0x24 committed Apr 13, 2019
1 parent 699e6ac commit 3c72c33
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ matrix:
git:
submodules: false
env: JOB=SWIFTPM_DARWIN
- sudo: required
dist: trusty
os: linux
language: generic
before_install:
- eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)"
script:
- swift --version
- swift build
- swift test
git:
submodules: false
env: JOB=SWIFTPM
- os: osx
osx_image: xcode10.1
script:
Expand Down
2 changes: 2 additions & 0 deletions Sources/Task.swift
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,14 @@ extension Task {
process.arguments = self.arguments

if shouldBeTerminatedOnParentExit {
#if os(macOS)
// This is for terminating subprocesses when the parent process exits.
// See https://github.com/Carthage/ReactiveTask/issues/3 for the details.
let selector = Selector(("setStartsNewProcessGroup:"))
if process.responds(to: selector) {
process.perform(selector, with: false as NSNumber)
}
#endif
}

if let cwd = self.workingDirectoryPath {
Expand Down
7 changes: 7 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import XCTest
@testable import ReactiveTaskTests

Quick.QCKMain([
StringExtensionSpec.self,
TaskSpec.self,
])

0 comments on commit 3c72c33

Please sign in to comment.