Skip to content

edit --version leaves trailing space #527

@SupSkiFun

Description

@SupSkiFun

Small issue; likely an easy fix; edit --version leaves a trailing space

edit version 1.2.0, Ubuntu 24.04, bash 5.2.21

Example:

ABC=$(./edit --version) ; echo ${#ABC}
19

GHI=$(./edit --version | sed -e 's/[[:space:]]*$//') ; echo ${#GHI}
18

Within edit/src/bin/edit/main.rs variable CARGO_PKG_VERSION is called in lines 287 - 289. Perhaps CARGO_PKG_VERSION contains a trailing space? Unfamiliar with RUST so just making a guess. Within my install/upgrade BASH script this causes an issue when comparing the latest version (minus the leading 'v') with the installed version. sed 'fixes' that as a workaround.

I use similar comparison logic to install/upgrade eksctl, go, powershell and sam (aws) without needing sed to trim trailing white space when checking the installed version.

If possible/easy please remove the trailing space from edit --version.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions