pg_upgrade don't echo windows commands
Started by Andrew Dunstanover 4 years ago2 messages
Here's a completely trivial command to turn of echoing of a couple of
Windows commands pg_upgrade writes to cleanup scripts. This makes them
behave more like the Unix equivalents.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
Attachments:
pg_upgrade-no-windows-command-echo.patchtext/x-patch; charset=UTF-8; name=pg_upgrade-no-windows-command-echo.patchDownload
diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h
index f7eb2349e6..022ce92a9d 100644
--- a/src/bin/pg_upgrade/pg_upgrade.h
+++ b/src/bin/pg_upgrade/pg_upgrade.h
@@ -77,8 +77,8 @@ extern char *output_files[];
#define pg_mv_file pgrename
#define PATH_SEPARATOR '\\'
#define PATH_QUOTE '"'
-#define RM_CMD "DEL /q"
-#define RMDIR_CMD "RMDIR /s/q"
+#define RM_CMD "@DEL /q"
+#define RMDIR_CMD "@RMDIR /s/q"
#define SCRIPT_PREFIX ""
#define SCRIPT_EXT "bat"
#define EXE_EXT ".exe"
Re: pg_upgrade don't echo windows commands
On Fri, Jun 04, 2021 at 12:10:47PM -0400, Andrew Dunstan wrote:
Here's a completely trivial command to turn of echoing of a couple of
Windows commands pg_upgrade writes to cleanup scripts. This makes them
behave more like the Unix equivalents.
Why not. Perhaps you should add a comment to mention that appending @
to those commands disables echo. That's not obvious for the reader.
--
Michael