Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux support #114

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
9 changes: 9 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import XCTest
import Quick

@testable import ReactiveTaskTests

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing Comma Violation: Collection literals should not have trailing commas. (trailing_comma)

])