Import upstream changes of TSC.Process
#460
Merged
+1,546
−1,238
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#458 を
CartonHelpers.Process
で実装しようとしたところ、プロセスの ワーキングディレクトリを設定する機能が実装されていませんでした。
最新の
TSC.Process
であれば実装されていたので、ソースコードをコピペして追従します。
ただ、新たに
TSCLibc
とTSCclibc
モジュールへの参照が追加されていたので、これらの追加も追従します。
また、依存として
TSC.Thread
も必要になっていたので、これも移植します。TSC.Process
は以下のバージョンと一致させています。https://github.com/apple/swift-tools-support-core/blob/990afca47e75cce136d2f59e464577e68a164035/Sources/TSCBasic/Process/Process.swift
このファイルのコミットヒストリーによればこれが最新です。
https://github.com/apple/swift-tools-support-core/commits/990afca47e75cce136d2f59e464577e68a164035/Sources/TSCBasic/Process/Process.swift
カレントディレクトリ設定が必要になるロジックはこの部分です。
carton/Tests/CartonCommandTests/CommandTestHelper.swift
Line 71 in bb9a91c