From b5f46027965ee1c78ede37a280e0561fc04a48de Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Wed, 23 Oct 2024 10:37:43 -0500 Subject: [PATCH] Replacing with GToolkit's OS process manager. --- repository/TiddlyWiki/TiddlyWiki.class.st | 25 +++++++++++------------ 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/repository/TiddlyWiki/TiddlyWiki.class.st b/repository/TiddlyWiki/TiddlyWiki.class.st index 9a359f3..c7c0ab5 100644 --- a/repository/TiddlyWiki/TiddlyWiki.class.st +++ b/repository/TiddlyWiki/TiddlyWiki.class.st @@ -302,10 +302,11 @@ TiddlyWiki >> exportJSONFileOptimized [ exporter := wikiFolder / 'scripts' / 'exportJsonFile'. exporter exists ifFalse: [ self installJsonExporter ]. - OSSUnixSubprocess new + GtSubprocessWithInMemoryOutput new command: exporter fullName; workingDirectory: exporter parent fullName; - runAndWaitOnExitDo: [ :process :outString | ^ self jsonFile ] + runAndWait. + ^ self jsonFile ] { #category : #accessing } @@ -540,22 +541,20 @@ TiddlyWiki >> importSTONFilesFrom: aFolder [ { #category : #accessing } TiddlyWiki >> installJsonExporter [ - | folder | - folder := (self file parent / 'scripts') ensureCreateDirectory. + | subfolder | + subfolder := (self folder / 'scripts') ensureCreateDirectory. ZnClient new url: 'https://mutabit.com/repos.fossil/mutabit/uv/wiki/scripts/exportJsonFile'; - downloadTo: folder / 'exportJsonFile'. + downloadTo: subfolder / 'exportJsonFile'. ZnClient new url: 'https://mutabit.com/repos.fossil/mutabit/doc/trunk/wiki/scripts/exportJsonFile.nim'; - downloadTo: folder / 'exportJsonFile.nim'. + downloadTo: subfolder / 'exportJsonFile.nim'. - OSSUnixSubprocess new - command: 'chmod'; - arguments: { '+x' . (folder / 'exportJsonFile') fullName }; - workingDirectory: folder fullName; - redirectStdout; - redirectStderr; - runAndWaitOnExitDo: [ :process :outString | ^ outString ] + ^ GtSubprocessWithInMemoryOutput new + command: 'chmod +x ' , ((subfolder / 'exportJsonFile') fullName); + workingDirectory: subfolder fullName; + runAndWait; + stdout ] { #category : #accessing }