check-disk-space 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -115,7 +115,7 @@ function checkDiskSpace(directoryPath, dependencies = {
|
|
|
115
115
|
reject(new InvalidPathError(`The following path is invalid (should be X:\\...): ${directoryPath}`));
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
-
return check(['
|
|
118
|
+
return check(['powershell', 'Get-CimInstance -ClassName Win32_LogicalDisk | Select-Object Caption, FreeSpace, Size'], driveData => {
|
|
119
119
|
// Only get the drive which match the path
|
|
120
120
|
const driveLetter = driveData[0];
|
|
121
121
|
return directoryPath.toUpperCase().startsWith(driveLetter.toUpperCase());
|
|
@@ -111,7 +111,7 @@ function checkDiskSpace(directoryPath, dependencies = {
|
|
|
111
111
|
reject(new InvalidPathError(`The following path is invalid (should be X:\\...): ${directoryPath}`));
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
return check(['
|
|
114
|
+
return check(['powershell', 'Get-CimInstance -ClassName Win32_LogicalDisk | Select-Object Caption, FreeSpace, Size'], driveData => {
|
|
115
115
|
// Only get the drive which match the path
|
|
116
116
|
const driveLetter = driveData[0];
|
|
117
117
|
return directoryPath.toUpperCase().startsWith(driveLetter.toUpperCase());
|