Hello @scolladon,
Reproduction step :
Result:

Expected Result :
sgd run properly without any error & if it throws one, at least, do not return a 0 exit code (== return a > 0 exit code)
Versions:
Linux Ubuntu Latest
Node version :
v12.16.3
Npm version :
6.14.4
[email protected]
added 12 packages from 54 contributors in 1.135s
3.0.5
Is it possible to isolate the issue ?
Are you able to provide an example repository where I can reproduce to issue on my laptop ?
@scolladon Reproduction repo will take a bit more time (+ I'm on windows & so can't reproduce it on my computer) but to start I can see this :
I look into the build where the error first appeared and here is the git diff that sgd has eaten :
files that has changed :
git diff 7cfebca4e00814f4e9064fc4e25edc6d9^..HEAD --name-only
force-app/main/default/classes/MaxCoverage_Test.cls
pipeline/templates/deploy.yml
git diff :
diff --git a/force-app/main/default/classes/MaxCoverage_Test.cls b/force-app/main/default/classes/MaxCoverage_Test.cls
index 99d29492..cdec887e 100644
--- a/force-app/main/default/classes/MaxCoverage_Test.cls
+++ b/force-app/main/default/classes/MaxCoverage_Test.cls
@@ -4,5 +4,6 @@ public with sharing class MaxCoverage_Test {
public static void MaxCoverage_Test() {
MaxCoverage max = new MaxCoverage();
+ Integer i = 0;
}
}
Thanks for those information.
If I create exactly the same "kind" of situation it is ok on my side.
What I can see confirm I need repository where I can reproduce the issue on my machine.
Arf, sad.. it's my client repo so step to reproduce it without releasing access to their code will be a pain ^^
+ I want to check with my pipe that it fails (or not) with the repro repository.
Let's see if I can go through this rabbit hole 馃憤
@scolladon, sorry I will close this one (I did make a full deploy (no delta) to skip the error & then reactivate delta for new commits and all went good)
There is something, somewhere but who care ? ^^
Thanks for your time
Hello, I still think that sgd shouldn't return a 0 exit code in this case & that the error stream redirection should work properly too.
example :
sgd -d -t HEAD -f null -r . -o output 2>&1 > err_sgd.txt
expected result:
command return a non 0 exit code
err_sgd.txt contains returned error
I will try to design a better way to handle stream in a next release