-
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.
Require OSProcess dependency in FileSystemGitRepository>>commandExists:
- Loading branch information
Showing
6 changed files
with
21 additions
and
10 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
src/FileSystem-Git.package/FileSystemGitRepository.class/instance/commandExists..st
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,3 +1,5 @@ | ||
git porcelain - external | ||
commandExists: aString | ||
^ (ShellSyntax new findExecutablePathFor: (aString copyUpTo: Character space) inDirectoryPath: nil) notNil | ||
^ ((self osProcessClass: #ShellSyntax) new | ||
findExecutablePathFor: (aString copyUpTo: Character space) | ||
inDirectoryPath: nil) notNil |
6 changes: 1 addition & 5 deletions
6
src/FileSystem-Git.package/FileSystemGitRepository.class/instance/externalCommand..st
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
3 changes: 3 additions & 0 deletions
3
src/FileSystem-Git.package/FileSystemGitRepository.class/instance/osProcess.st
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
git porcelain - external | ||
osProcess | ||
^ self osProcessClass: #OSProcess |
8 changes: 8 additions & 0 deletions
8
src/FileSystem-Git.package/FileSystemGitRepository.class/instance/osProcessClass..st
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
git porcelain - external | ||
osProcessClass: aSymbol | ||
(Smalltalk classNamed: aSymbol) ifNotNil: [:class | ^ class]. | ||
(self confirm: 'OSProcess is not installed, but is needed to run git externally. Install it?') | ||
ifFalse: [^ self error: 'OSProcess is needed to run git externally.']. | ||
Installer ss project: 'OSProcess'; install: 'OSProcess'. | ||
Installer ss project: 'CommandShell'; install: 'CommandShell'. | ||
^ Smalltalk classNamed: aSymbol |
2 changes: 1 addition & 1 deletion
2
...ileSystem-Git.package/FileSystemGitRepository.class/instance/suggestWSLGitInstallation.st
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,4 +1,4 @@ | ||
git porcelain - external | ||
suggestWSLGitInstallation | ||
(OSProcess isWindows and: [self commandExists: 'wsl']) ifFalse: [^ '']. | ||
(self osProcess isWindows and: [self commandExists: 'wsl']) ifFalse: [^ '']. | ||
^ 'If git is installed in WSL, you can also enter ''wsl git''.' |
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