Creating Nimble version info method.
This commit is contained in:
parent
18d6aca473
commit
e5ea6e7fd8
@ -29,6 +29,7 @@ NanoID class >> install [
|
||||
IMPORTANT: Nimble, Nim's package manager should be installed, as this process doesn't verify its proper installation."
|
||||
| binaryFileFolder |
|
||||
binaryFileFolder := self binaryFile parent.
|
||||
binaryFileFolder exists ifFalse: [ binaryFileFolder ensureCreateDirectory ].
|
||||
self binaryFile exists ifTrue: [ ^ binaryFileFolder ].
|
||||
Nimble install: 'nanoid'.
|
||||
OSSUnixSubprocess new
|
||||
|
@ -34,6 +34,20 @@ Nimble class >> installed [
|
||||
command: 'nimble';
|
||||
arguments: #('list' '--installed');
|
||||
redirectStdout;
|
||||
runAndWaitOnExitDo: [ :command :outString | installed := outString ].
|
||||
^ installed lines
|
||||
redirectStderr;
|
||||
runAndWaitOnExitDo: [ :process :outString :errString |
|
||||
process isSuccess
|
||||
ifTrue: [ ^ outString lines ];
|
||||
ifFalse: [ ^ nil ]
|
||||
]
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
Nimble class >> version [
|
||||
|
||||
OSSUnixSubprocess new
|
||||
command: 'nimble';
|
||||
arguments: #('--version');
|
||||
redirectStdout;
|
||||
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user