[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 6f9b002e: astscript-fits-view: only using scre
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 6f9b002e: astscript-fits-view: only using screen geometry when value was read |
Date: |
Tue, 30 Apr 2024 08:18:24 -0400 (EDT) |
branch: master
commit 6f9b002edb343dd674e625592fb0580f3b4848d9
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
astscript-fits-view: only using screen geometry when value was read
Until now, when the screen geometry could not be read, the value to DS9's
'-geometry' option would become an empty string, causing an error when
'astscript-fits-view' was called.
With this commit, to avoid a crash we now check the resulting string and if
it is empty, we ignore DS9's '-geometry' option.
This bug was reported by Ooldooz Kabood.
This fixes bug #65662.
---
THANKS | 1 +
bin/script/fits-view.sh | 8 +++++++-
doc/announce-acknowledge.txt | 1 +
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/THANKS b/THANKS
index 22387b99..a5d7ae79 100644
--- a/THANKS
+++ b/THANKS
@@ -108,6 +108,7 @@ support in Gnuastro. The list is ordered alphabetically (by
family name).
Nima Dehdilani nimadehdilani@gmail.com
Nushkia Chamba chamba@iac.es
Ole Streicher olebole@debian.org
+ Ooldooz Kabood kaboodooldooz@gmail.com
Oryna Ivashtenko arinaivashtenko@gmail.com
Paola Dimauro paola.dimauro@inaf.it
Paul Eggert eggert@cs.ucla.edu
diff --git a/bin/script/fits-view.sh b/bin/script/fits-view.sh
index 55b42f05..3742cc2f 100644
--- a/bin/script/fits-view.sh
+++ b/bin/script/fits-view.sh
@@ -318,7 +318,13 @@ if [ x"$ds9geometry" = x ]; then
| awk 'NR==1{w=0.75*$2; printf "%dx%d\n", w, $2}')
fi
fi
-ds9geoopt="-geometry $ds9geometry"
+
+# It can happen that 'ds9geometry' is still an empty string (the command to
+# read the geometry could have failed on the host operating system), in
+# such cases, we should just ignore this option.
+if ! [ x"$ds9geometry" = x ]; then
+ ds9geoopt="-geometry $ds9geometry"
+fi
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 463ccf07..b2ddc13c 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -6,6 +6,7 @@ Greg Wooledge
Hamed Altafi
Jesús Vega
Juan Castillo Ramírez
+Ooldooz Kabood
Phil Wyett
Rahna Payyasseri Thanduparackal
Raul Infante-Sainz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master 6f9b002e: astscript-fits-view: only using screen geometry when value was read,
Mohammad Akhlaghi <=