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