Skip to content

Commit 48a8c14

Browse files
lib: pretty print path
1 parent c561192 commit 48a8c14

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/find-python.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,14 @@ class PythonFinder {
492492
this.logger.log.verbose(`${this.logger.colorizeOutput(Logger.colors.GREEN, 'execFile')}: exec = `, exec)
493493
this.logger.log.verbose(`${this.logger.colorizeOutput(Logger.colors.GREEN, 'execFile')}: args = `, args)
494494
// TODO: make beauty print of PATH property (new line by semicolon)
495-
this.logger.log.silly(`${this.logger.colorizeOutput(Logger.colors.GREEN, 'execFile')}: opts = `, JSON.stringify(opts, null, 2), '\n\n')
495+
this.logger.log.silly('execFile: opts = ', JSON.stringify(opts, (key, value) => {
496+
if (key.toLowerCase() === 'path') {
497+
if (typeof value === 'string') {
498+
return ['!!!! ATTENTION !!!! THIS IS NOT A REAL ARRAY!!!', 'IS IS FORMATTED AS ARRAY TO BEAUTIFUL OUTPUT!!!', 'IN PRACTICE IT IS STRING OF VALUES SEPARATED BY SEMICOLONS', ...value.split(';')]
499+
}
500+
}
501+
return value
502+
}, 2))
496503

497504
//* possible outcomes with error messages on Windows (err.message, error.stack?, stderr)
498505
// issue of encoding (garbage in terminal ) when 866 or any other locale code

0 commit comments

Comments
 (0)