Fixing problem with automatic location of the Fossil binary on Unix based systems, because 'which' command outputs a final space character.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2020-03-15 14:33:02 +00:00
parent 98d0c680f0
commit 4a64bc3cf8

View File

@ -39,7 +39,8 @@ FossilRepo class >> locateExecutable [
command: 'which';
arguments: #('fossil') ;
redirectStdout;
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
runAndWaitOnExitDo: [ :process :outString |
^ outString allButLast ]
]
{ #category : #operation }
@ -49,8 +50,8 @@ FossilRepo >> add: fileRelativePath [
OSSUnixSubprocess new
command: self class locateExecutable;
arguments: { 'add' . fileRelativePath };
workingDirectory: self localFolderName;
arguments: { 'add' . fileRelativePath };
redirectStdout;
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
]