@@ -311,9 +311,9 @@ proc runFile*(path: string) =
311
311
312
312
# add directory containing .pipeline file to PYTHONPATH
313
313
when defined windows:
314
- syssetpath($ ( getPath() ) & " ;" & path[0 .. path.rfind(" /" )])
314
+ syssetpath($ getPath() & " ;" & path[0 .. path.rfind(" /" )])
315
315
else :
316
- syssetpath($ ( getPath() ) & " :" & path[0 .. path.rfind(" /" )])
316
+ syssetpath($ getPath() & " :" & path[0 .. path.rfind(" /" )])
317
317
318
318
# run code
319
319
discard runSimpleString(code)
@@ -352,15 +352,25 @@ proc main() =
352
352
# get path to file to run
353
353
let path: string = paramStr(1 )
354
354
355
+ # files compiled
356
+ var filesCompiled: seq [string ] = @ []
357
+
355
358
# run file
356
359
if fileExists(path):
357
360
compileFile(path)
361
+ filesCompiled.add(path)
358
362
elif dirExists(path):
359
363
for kind, file in walkDir(path):
360
- if file.endsWith(" .pipleine " ):
364
+ if file.endsWith(" .pipeline " ):
361
365
compileFile(file)
366
+ filesCompiled.add(file)
362
367
else :
363
368
echo(path & " not found" )
369
+
370
+ # print info
371
+ echo($ filesCompiled.len & " " & (if filesCompiled.len == 1 : " file" else : " files" ) & " compiled" & (if dirExists(path): " at " & path else : " " ) & " :" )
372
+ for file in filesCompiled:
373
+ echo(" " & file)
364
374
of 2 :
365
375
case paramStr(1 ):
366
376
of " r" , " run" :
@@ -380,6 +390,9 @@ proc main() =
380
390
# get path to folder to clean
381
391
let path: string = paramStr(2 )
382
392
393
+ # number of files removed
394
+ var filesRemoved: seq [string ] = @ []
395
+
383
396
# clean folder
384
397
for kind, file in walkDir(path):
385
398
# compiled .py file
@@ -388,6 +401,12 @@ proc main() =
388
401
# remove compiled file if it exists
389
402
if compiledFile != " " :
390
403
removeFile(compiledFile)
404
+ filesRemoved.add(compiledFile)
405
+
406
+ # print info
407
+ echo($ filesRemoved.len & " " & (if filesRemoved.len == 1 : " file" else : " files" ) & " removed from " & path & " :" )
408
+ for file in filesRemoved:
409
+ echo(" " & file)
391
410
else :
392
411
discard
393
412
0 commit comments