From b1eb92e3ad3d37374058f420e68d3bade60c2492 Mon Sep 17 00:00:00 2001 From: your name Date: Tue, 24 Sep 2024 18:04:33 +0000 Subject: [PATCH] Switched the 'ls -L' and the logging '-l' flags --- cmd/object_ls.go | 8 +------- cmd/root.go | 8 +------- github_scripts/get_put_test.sh | 4 ++-- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/cmd/object_ls.go b/cmd/object_ls.go index a8fca1bb0..003623403 100644 --- a/cmd/object_ls.go +++ b/cmd/object_ls.go @@ -45,18 +45,12 @@ var ( func init() { flagSet := lsCmd.Flags() flagSet.StringP("token", "t", "", "Token file to use for transfer") - flagSet.BoolP("long", "L", false, "Include extended information - The '-L' for long output will be changed to '-l' in the 7.11.0 pelican release") + flagSet.BoolP("long", "l", false, "Include extended information") flagSet.BoolP("collectionOnly", "C", false, "List collections only") flagSet.BoolP("objectonly", "O", false, "List objects only") flagSet.BoolP("json", "j", false, "Print results in JSON format") objectCmd.AddCommand(lsCmd) - - lsCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) { - if cmd.Flags().Changed("long") { - log.Warningln("The '-L' for long output will be changed to '-l' in the 7.11.0 pelican release") - } - } } func listMain(cmd *cobra.Command, args []string) error { diff --git a/cmd/root.go b/cmd/root.go index 1cc8a1f48..4aa40996d 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -147,7 +147,7 @@ func init() { panic(err) } - rootCmd.PersistentFlags().StringP("log", "l", "", "Specified log output file - The '-l' for logging will be changed to '-L' in the 7.11.0 pelican release") + rootCmd.PersistentFlags().StringP("log", "L", "", "Specified log output file") if err := viper.BindPFlag("Logging.LogLocation", rootCmd.PersistentFlags().Lookup("log")); err != nil { panic(err) } @@ -169,10 +169,4 @@ func init() { if err := viper.BindPFlag("Server.WebPort", portFlag); err != nil { panic(err) } - - rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) { - if cmd.Flags().Changed("log") { - log.Warningln("The '-l' for logging will be changed to '-L' in the 7.11.0 pelican release") - } - } } diff --git a/github_scripts/get_put_test.sh b/github_scripts/get_put_test.sh index 8630d63cb..873646783 100755 --- a/github_scripts/get_put_test.sh +++ b/github_scripts/get_put_test.sh @@ -123,7 +123,7 @@ do done # Run pelican object put -./pelican object put ./get_put_tmp/input.txt pelican://$HOSTNAME:8444/test/input.txt -d -t get_put_tmp/test-token.jwt -l get_put_tmp/putOutput.txt +./pelican object put ./get_put_tmp/input.txt pelican://$HOSTNAME:8444/test/input.txt -d -t get_put_tmp/test-token.jwt -L get_put_tmp/putOutput.txt # Check output of command if grep -q "Dumping response: HTTP/1.1 200 OK" get_put_tmp/putOutput.txt; then @@ -134,7 +134,7 @@ else exit 1 fi -./pelican object get pelican://$HOSTNAME:8444/test/input.txt get_put_tmp/output.txt -d -t get_put_tmp/test-token.jwt -l get_put_tmp/getOutput.txt +./pelican object get pelican://$HOSTNAME:8444/test/input.txt get_put_tmp/output.txt -d -t get_put_tmp/test-token.jwt -L get_put_tmp/getOutput.txt # Check output of command if grep -q "HTTP Transfer was successful" get_put_tmp/getOutput.txt; then