Macaulay2 / M2

The primary source code repository for Macaulay2, a system for computing in commutative algebra, algebraic geometry and related fields.
https://macaulay2.com
347 stars 231 forks source link

PHCpack package can't get version number #1315

Closed DanGrayson closed 4 years ago

DanGrayson commented 4 years ago

An unfortunate consequence of adding the "-0" to the name of the executable recently:

$ phc -0 --version
-0 is not recognized.

, resulting in this example output:

$ git diff packages/PHCpack/examples/_version__Number.out
diff --git a/M2/Macaulay2/packages/PHCpack/examples/_version__Number.out b/M2/Macaulay2/packages/PHCpack/examples/_version__Number.out
index beb19324c..cc037ae97 100644
--- a/M2/Macaulay2/packages/PHCpack/examples/_version__Number.out
+++ b/M2/Macaulay2/packages/PHCpack/examples/_version__Number.out
@@ -1,17 +1,18 @@
--- -*- M2-comint -*- {* hash: -211311793 *}
--- COMPILE TIME: Oct  7 2016, 07:56:28
---loading configuration for package "PHCpack" from file /Users/leykin/Library/Application Support/Macaulay2/init-PHCpack.m2
+-- -*- M2-comint -*- hash: -211311793

 i1 : v = versionNumber(null)
+Which version of phc is in your execution path?
+-0 is not recognized.

-o1 = (2.4.27, 2016-10-16)
+
+o1 = (, )

 o1 : Sequence

 i2 : print v_0
-2.4.27
+

 i3 : print v_1
-2016-10-16
+

And it's a bug in phc that the error is not indicated in the return code:

habanero$ phc -0 --version
-0 is not recognized.
habanero$ echo $?
0
antonleykin commented 4 years ago

Close this?