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."
|
IMPORTANT: Nimble, Nim's package manager should be installed, as this process doesn't verify its proper installation."
|
||||||
| binaryFileFolder |
|
| binaryFileFolder |
|
||||||
binaryFileFolder := self binaryFile parent.
|
binaryFileFolder := self binaryFile parent.
|
||||||
|
binaryFileFolder exists ifFalse: [ binaryFileFolder ensureCreateDirectory ].
|
||||||
self binaryFile exists ifTrue: [ ^ binaryFileFolder ].
|
self binaryFile exists ifTrue: [ ^ binaryFileFolder ].
|
||||||
Nimble install: 'nanoid'.
|
Nimble install: 'nanoid'.
|
||||||
OSSUnixSubprocess new
|
OSSUnixSubprocess new
|
||||||
|
@ -34,6 +34,20 @@ Nimble class >> installed [
|
|||||||
command: 'nimble';
|
command: 'nimble';
|
||||||
arguments: #('list' '--installed');
|
arguments: #('list' '--installed');
|
||||||
redirectStdout;
|
redirectStdout;
|
||||||
runAndWaitOnExitDo: [ :command :outString | installed := outString ].
|
redirectStderr;
|
||||||
^ installed lines
|
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