Error trying to set variable #160825
Replies: 2 comments
-
| This issue is happening because you’re trying to write the version number (like 0.0.1.10) to the GitHub Actions environment using this line: echo "bv2=$BASE_VERSION" >> "$GITHUB_ENV" That's why this works fine: echo "source_version2=$SOURCE_VERSION" >> "$GITHUB_ENV" echo "bv2=$BASE_VERSION" >> "$GITHUB_ENV" Fix echo "bv2="$BASE_VERSION"" >> "$GITHUB_ENV" echo "source_version2="$SOURCE_VERSION"" >> "$GITHUB_ENV" Let me know if you want a cleaner way to compare versions using sort -V instead of numeric formatting, | 
Beta Was this translation helpful? Give feedback.
-
| 🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as  2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the  Thank you for helping bring this Discussion to a resolution! 💬 | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Why are you starting this discussion?
Question
What GitHub Actions topic or product is this about?
Misc
Discussion Details
I have the following GitHub action which is trying to check the version number in two different branches, and compare them, just to check i updated the version number of my DLL before I do a pull request back into my main branch.
The code to extract the "source" version number is working fine, but the code to extract the base branch version number throws an error "Unable to process file command 'env' successfully. Invalid Format '0.0.1.10'
Any idea why this is? The code and syntax is the same as what i used the get the version number from the source branch, so I'm stuck as to why it doesn't work for the base branch.
Any help appreciated!
Beta Was this translation helpful? Give feedback.
All reactions