Skip to content

Commit

Permalink
check xterm
Browse files Browse the repository at this point in the history
  • Loading branch information
hemnstill committed Mar 1, 2024
1 parent 75ae521 commit 4081920
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
if: matrix.artifact == 'ubuntu'
run: |
apt update
apt install -y busybox dos2unix libarchive-tools python3 git xterm
apt install -y busybox dos2unix libarchive-tools python3 git
git config --global --add safe.directory '*'
- name: Install Alpine packages
Expand Down
8 changes: 7 additions & 1 deletion _AutoinstallCreator/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
_root_path: str = os.path.dirname(_self_path)
_tools_path: str = os.path.join(_root_path, '.tools')

busybox_exe_path_arg: list[str] = ['xterm', '-e']
busybox_exe_path_arg: list[str] = []
update_script_name: str = 'update.sh'
package_name = 'AutoinstallCreator.sh'
if sys.platform.startswith('win'):
Expand Down Expand Up @@ -41,10 +41,16 @@ class TestUpdate(unittest.TestCase):

@classmethod
def setUpClass(cls) -> None:
global busybox_exe_path_arg

pathlib.Path(os.path.join(_self_path, 'AutoinstallCreator.sh')).unlink(missing_ok=True)
pathlib.Path(os.path.join(_self_path, 'AutoinstallCreator.sh.bat')).unlink(missing_ok=True)
pathlib.Path(_self_body_path).unlink(missing_ok=True)

if not sys.platform.startswith('win'):
if shutil.which('xterm'):
busybox_exe_path_arg = ['xterm', '-e']

subprocess.run(busybox_exe_path_arg + [os.path.join(_self_path, 'release.sh')],
check=True)
cls.version_str = io_tools.read_text(_self_body_path).strip('\r\n')
Expand Down

0 comments on commit 4081920

Please sign in to comment.