-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* parse the podfile yaml format with target information * run zsh as an interactive login shell * Revert "parse the podfile yaml format with target information" This reverts commit 4d976ec. * get dependencies for every target * filter dependencies by target * fix test * remove dependency * make request changes * adapt history command * update graph command * update documentation * fix podfile and podfile method names * improve test clarity * add some more asserts for podfile parsing test * Update README.md Co-authored-by: Shammi Didla <sdidla@gmail.com> * Update README.md Co-authored-by: Shammi Didla <sdidla@gmail.com> * Update README.md Co-authored-by: Shammi Didla <sdidla@gmail.com> * Update README.md Co-authored-by: Shammi Didla <sdidla@gmail.com> * extract podfile from the history * fix history command Co-authored-by: Shammi Didla <sdidla@gmail.com>
- Loading branch information
Showing
11 changed files
with
380 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 7 additions & 4 deletions
11
Sources/jungle/Commands/Shell.swift → Sources/Shell/Shell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
import Foundation | ||
|
||
func shell(_ command: String, at currentDirectoryURL: URL) throws -> String { | ||
public func shell(_ command: String, at currentDirectoryURL: URL? = nil) throws -> String { | ||
let task = Process() | ||
let pipe = Pipe() | ||
|
||
task.standardOutput = pipe | ||
task.standardError = pipe | ||
task.arguments = ["-c", command] | ||
task.arguments = ["--login", "-c", command] | ||
task.launchPath = "/bin/zsh" | ||
task.standardInput = nil | ||
task.currentDirectoryURL = currentDirectoryURL | ||
|
||
if let currentDirectoryURL = currentDirectoryURL { | ||
task.currentDirectoryURL = currentDirectoryURL | ||
} | ||
|
||
try task.run() | ||
|
||
let data = pipe.fileHandleForReading.readDataToEndOfFile() | ||
let output = String(data: data, encoding: .utf8)! | ||
|
||
return output | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.