Skip to content

Commit f64db41

Browse files
committed
Now writing errors if package steps fail
1 parent db9d0f5 commit f64db41

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

package.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,19 @@ def isChangeLogUpdatedWithPackageJsonVersion(packageJsonVersion) -> bool:
3535
def isAllPackagesInstalledLocally() -> bool:
3636
process = subprocess.Popen(["cmd", "/c", "npm", "list", "--production", "--parseable", "--depth=99999", "--loglevel=error"], stderr=subprocess.PIPE)
3737
out = process.stderr.read()
38-
return (len(out) == 0)
38+
success = (len(out) == 0);
39+
if (not success):
40+
print(f"Error while checking if all packages is installed locally: {out}")
41+
return success
3942

4043

4144
def packageExtension() -> bool:
4245
process = subprocess.Popen(["cmd", "/c", "vsce", "package"], stderr=subprocess.PIPE)
4346
out = process.stderr.read()
44-
return (len(out) == 0)
47+
success = (len(out) == 0);
48+
if (not success):
49+
print(f"Error while packaging: {out}")
50+
return success
4551

4652
def main():
4753
packageJsonVersion = readVersionFromPackageJson()

0 commit comments

Comments
 (0)