mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 01:38:11 +08:00
Foo
This commit is contained in:
+4
-21
@@ -278,27 +278,6 @@ function generateRustLicenses(): LicenseInfo[] | undefined {
|
|||||||
console.error(`Error reading directory ${dir}:`, err);
|
console.error(`Error reading directory ${dir}:`, err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Print all directories in the OS except for irrelevant internals
|
|
||||||
console.info("\n\nAll directories in the OS:\n");
|
|
||||||
const rootDirs = ["C:\\", "D:\\", "E:\\"]; // Add other root directories if needed
|
|
||||||
rootDirs.forEach((rootDir) => {
|
|
||||||
try {
|
|
||||||
const listDirectories = (dir: string) => {
|
|
||||||
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
||||||
entries.forEach((entry) => {
|
|
||||||
if (entry.isDirectory()) {
|
|
||||||
const fullPath = path.join(dir, entry.name);
|
|
||||||
console.info(fullPath);
|
|
||||||
listDirectories(fullPath);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
listDirectories(rootDir);
|
|
||||||
} catch (err) {
|
|
||||||
console.error(`Error reading root directory ${rootDir}:`, err);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// END DEBUG
|
// END DEBUG
|
||||||
|
|
||||||
// Call `cargo about` in the terminal to generate the license information for Rust crates.
|
// Call `cargo about` in the terminal to generate the license information for Rust crates.
|
||||||
@@ -311,6 +290,10 @@ function generateRustLicenses(): LicenseInfo[] | undefined {
|
|||||||
windowsHide: true, // Hide the terminal on Windows
|
windowsHide: true, // Hide the terminal on Windows
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("stdout:\n", stdout);
|
||||||
|
console.log("stderr:\n", stderr);
|
||||||
|
console.log("status:\n", status);
|
||||||
|
|
||||||
// If the command failed, print the error message and exit early.
|
// If the command failed, print the error message and exit early.
|
||||||
if (status !== 0) {
|
if (status !== 0) {
|
||||||
// Cargo returns 101 when the subcommand (`about`) wasn't found, so we skip printing the below error message in that case.
|
// Cargo returns 101 when the subcommand (`about`) wasn't found, so we skip printing the below error message in that case.
|
||||||
|
|||||||
Reference in New Issue
Block a user