Fixing requirements for external binary compilation from Nim.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-03-09 15:20:24 -05:00
parent f365b3529e
commit a4c77629ff
2 changed files with 10 additions and 3 deletions

View File

@ -62,13 +62,12 @@ MiniDocs class >> installYamlToJson [
self yamlToJsonBinary exists ifTrue: [ ^ MiniDocs appFolder ].
Nimble
install: 'yaml';
install: 'json';
install: 'commandeer'.
OSSUnixSubprocess new
command: 'nim';
arguments: {'c'. self yamlToJsonSourceCode fullName};
runAndWaitOnExitDo: [ :process :outString |
(self yamlToJsonSourceCode parent / self yamlToJsonSourceCode basenameWithoutExtension) moveToPageTitled: MiniDocs appFolder asFileReference.
(self yamlToJsonSourceCode parent / self yamlToJsonSourceCode basenameWithoutExtension) moveTo: MiniDocs appFolder asFileReference.
^ MiniDocs appFolder ]
]

View File

@ -25,7 +25,15 @@ Nimble class >> install: packageName [
arguments: {'install'.
packageName};
redirectStdout;
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
redirectStderr;
runAndWaitOnExitDo: [ :process :outString :errString |
process isSuccess
ifTrue: [ Transcript show: 'Command exited correctly with output: ', outString. ]
ifFalse: [
^ 'Command exit with error status: ', process exitStatusInterpreter printString, String cr,
'Stderr contents: ', errString.
]
]
]
{ #category : #accessing }