[PATCH] tests: use `pwd` instead of $PWD

Manuel Jacob me at manueljacob.de
Sat Jul 4 10:45:21 UTC 2020


# HG changeset patch
# User Manuel Jacob <me at manueljacob.de>
# Date 1593858979 -7200
#      Sat Jul 04 12:36:19 2020 +0200
# Node ID 5e758cf2e5c1c2c9b8d11c5dc227b35797ec83a6
# Parent  73bee569f39d229412809a45c8b21fc809c5d996
# EXP-Topic pwd
tests: use `pwd` instead of $PWD

Before, check-code gave the following warning:

tests/test-rhg.t:13:
 >   $ rm -rf $PWD
 warning: don't use $PWD, use `pwd`

diff --git a/tests/test-rhg.t b/tests/test-rhg.t
--- a/tests/test-rhg.t
+++ b/tests/test-rhg.t
@@ -10,7 +10,7 @@
   $ rhg root > /dev/full
   abort: No space left on device (os error 28)
   [255]
-  $ rm -rf $PWD
+  $ rm -rf `pwd`
   $ rhg root
   abort: error getting current working directory: $ENOENT$
   [255]



More information about the Mercurial-devel mailing list