From 1cdf89d96fb1eb0424bc9a8d2f72e7569859e33a Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 22 Jun 2024 13:21:24 -0500 Subject: [PATCH] Using GtSubprocess instead of OSSubprocess. --- src/ExoRepo/NanoID.class.st | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ExoRepo/NanoID.class.st b/src/ExoRepo/NanoID.class.st index 2b21cad..a73756f 100644 --- a/src/ExoRepo/NanoID.class.st +++ b/src/ExoRepo/NanoID.class.st @@ -31,12 +31,11 @@ NanoID class >> binaryFile [ NanoID class >> generate [ self binaryFile exists ifFalse: [ NanoID install]. Smalltalk os isWindows - ifTrue: [ ^ (LibC resultOfCommand:self binaryFile fullName) copyWithoutAll: (Character lf asString) ]. - OSSUnixSubprocess new - command: self binaryFile fullName; - redirectStdout; - redirectStdout; - runAndWaitOnExitDo: [ :process :outString | ^ outString copyWithoutAll: (Character lf asString) ] + ifTrue: [ ^ (LibC resultOfCommand:self binaryFile fullName) copyWithoutAll: (Character lf asString) ]. + ^ (GtSubprocessWithInMemoryOutput new + shellCommand: self binaryFile fullName; + runAndWait; + stdout) copyWithoutAll: (Character lf asString) ] { #category : #accessing }