diff --git a/src/MiniDocs/NanoID.class.st b/src/MiniDocs/NanoID.class.st index 2670e61..1b7864f 100644 --- a/src/MiniDocs/NanoID.class.st +++ b/src/MiniDocs/NanoID.class.st @@ -27,12 +27,15 @@ NanoID class >> binaryFile [ NanoID class >> install [ "For the moment, only Gnu/Linux and Mac are supported. IMPORTANT: Nimble, Nim's package manager should be installed, as this process doesn't verify its proper installation." + | binaryFileFolder | + binaryFileFolder := self binaryFile parent. + self binaryFile exists ifTrue: [ ^ binaryFileFolder ]. Nimble install: 'nanoid'. - OSSUnixSubprocess new + OSSUnixSubprocess new command: 'nim'; arguments: {'c'. self scriptSourceCode fullName}; - workingDirectory: self binaryFile parent; - runAndWaitOnExitDo: [ :process :outString | ^ self binaryFile parent ] + workingDirectory: binaryFileFolder; + runAndWaitOnExitDo: [ :process :outString | ^ binaryFileFolder ] ] { #category : #accessing } diff --git a/src/MiniDocs/Nimble.class.st b/src/MiniDocs/Nimble.class.st index f37fa56..ae47263 100644 --- a/src/MiniDocs/Nimble.class.st +++ b/src/MiniDocs/Nimble.class.st @@ -23,6 +23,7 @@ Nimble class >> install: packageName [ command: 'nimble'; arguments: {'install'. packageName}; + redirectStdout; runAndWaitOnExitDo: [ :process :outString | ^ outString ] ]