mirror of
https://github.com/democratic-csi/democratic-csi.git
synced 2026-10-22 07:10:58 +02:00
reduce memory footprint by reusing object instances
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
@@ -610,17 +610,17 @@ class Filesystem {
|
||||
const filesystem = this;
|
||||
args = args || [];
|
||||
|
||||
let stdout = "";
|
||||
let stderr = "";
|
||||
|
||||
if (filesystem.options.sudo) {
|
||||
args.unshift(command);
|
||||
command = filesystem.options.paths.sudo;
|
||||
}
|
||||
console.log("executing filesystem command: %s %s", command, args.join(" "));
|
||||
const child = filesystem.options.executor.spawn(command, args, options);
|
||||
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
const child = filesystem.options.executor.spawn(command, args, options);
|
||||
let stdout = "";
|
||||
let stderr = "";
|
||||
|
||||
child.stdout.on("data", function (data) {
|
||||
stdout = stdout + data;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user