Skip to content

Commit 511f9d4

Browse files
lib: pretty print path
1 parent c561192 commit 511f9d4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/find-python.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,16 @@ 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))
503+
504+
496505

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

0 commit comments

Comments
 (0)