Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error in wslfetch and wslsys #294

Closed
1 task done
gordonwatts opened this issue Nov 8, 2023 · 3 comments
Closed
1 task done

Syntax error in wslfetch and wslsys #294

gordonwatts opened this issue Nov 8, 2023 · 3 comments
Assignees
Labels
Bug This is either an issue that describes a bug or a PR that resolves a bug Status: Patched This is fixed and is part of a released version. Target: 4.x This is targeted to the 4.x release.

Comments

@gordonwatts
Copy link

Windows Version

Windows 11

Windows Build Number

22631

WSL Version

WSL 2

Distro Version

CENTOS7

WSL Utilities Version

v4.1.1-1

Describe the bug

Most of the utilities I've tried give the following syntax error on this distro:

[gwatts@SurfacePhoto ~]$ wslfetch
/usr/bin/wslfetch: line 245: "15" / 8 : syntax error: operand expected (error token is ""15" / 8 ")
/usr/bin/wslsys: line 245: "15" / 8 : syntax error: operand expected (error token is ""15" / 8 ")
/usr/bin/wslsys: line 245: "15" / 8 : syntax error: operand expected (error token is ""15" / 8 ")
 /$$      /$$  /$$$$$$  /$$       Windows Subsystem for Linux (WSL)
| $$  /$ | $$ /$$__  $$| $$       gwatts@SurfacePhoto
| $$ /$$$| $$| $$  \__/| $$       Build: 22631
| $$/$$ $$ $$|  $$$$$$ | $$       Branch: ni_release
| $$$$_  $$$$ \____  $$| $$       Release: CentOS Linux 7 (Core)
| $$$/ \  $$$ /$$  \ $$| $$       Kernel: Linux 5.15.90.1-microsoft-standard-WSL2
| $$/   \  $$|  $$$$$$/| $$$$$$$$ Uptime (Windows): 0d 1h 3m
|__/     \__/ \______/ |________/

It seems like it is still doing what it is supposed to be doing, however (opening a url, etc.).

Steps to Reproduce

sudo yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/wslutilities/RHEL_7/home:wslutilities.repo
sudo yum install -y wslu
wslfetch

Expected behavior

THe output of wslfetch as shown above, but without the syntax errors.

Additional context

Many thanks for the utilities!!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gordonwatts gordonwatts added the Bug This is either an issue that describes a bug or a PR that resolves a bug label Nov 8, 2023
@patrick330602
Copy link
Member

can you show your bash version?

@patrick330602 patrick330602 added the Target: 4.x This is targeted to the 4.x release. label Nov 12, 2023
@gordonwatts
Copy link
Author

Yep - that is it! On an old container where most of our work still continues in the experiment, and this bug shows up:

[gwatts@AMDOfficeCore ~]$ bash --version
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

And on a new one that we will move to over the next 5 years (and where it works):

[gwatts@AMDOfficeCore ~]$ bash --version
GNU bash, version 5.1.8(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

What is the limit of where it works?

@patrick330602
Copy link
Member

This should be suggested to be used with bash 5

@patrick330602 patrick330602 added the Status: Pending Release This is fixed but not yet released. label Dec 30, 2023
@patrick330602 patrick330602 added Status: Patched This is fixed and is part of a released version. and removed Status: Pending Release This is fixed but not yet released. labels Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is either an issue that describes a bug or a PR that resolves a bug Status: Patched This is fixed and is part of a released version. Target: 4.x This is targeted to the 4.x release.
Projects
None yet
Development

No branches or pull requests

2 participants