We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41a871e commit e679300Copy full SHA for e679300
1 file changed
implement-shell-tools/ls/customLs.js
@@ -19,7 +19,7 @@ async function formatFileName(base, fileName) {
19
try {
20
const fullPath = `${base.endsWith("/") ? base : base + "/"}${fileName}`;
21
const stats = await fs.stat(fullPath);
22
- if (stats.isDirectory()) {
+ if (stats.isDirectory() && process.stdout.isTTY) {
23
return `\x1b[1;34m${fileName}\x1b[0m`;
24
}
25
return fileName;
@@ -64,7 +64,7 @@ try {
64
if (stats && stats.isFile()) {
65
console.log(path);
66
} else {
67
- console.log(
+ console.error(
68
`Can't access to this path: ${path} - No such file or directory`,
69
);
70
process.exit(1);
0 commit comments