Skip to content
Commit 4de60581 authored by Malte Poll's avatar Malte Poll Committed by Matthew Clarkson
Browse files

fix: strip output of `uname -r`

I saw an isue where `uname -r` contains an extra newline on some
machines. This leads to the code trying to parse an int from
an invalid string:

Repository rule triplet defined at:
  /.../external/toolchain_utils~/toolchain/local/triplet/repository.bzl:33:26: in <toplevel>
ERROR: /.../external/toolchain_utils~/toolchain/local/triplet/os.bzl:126:82: An error occurred during the fetch of repository 'toolchain_utils~~_repo_rules~local':
   Traceback (most recent call last):
	File "/.../external/toolchain_utils~/toolchain/local/triplet/repository.bzl", line 24, column 25, in implementation
		triplet = detect(rctx).value
	File "/.../external/toolchain_utils~/toolchain/local/triplet/detect.bzl", line 11, column 11, in detect
		os(rctx).value,
	File "/.../external/toolchain_utils~/toolchain/local/triplet/os.bzl", line 181, column 22, in os
		return _uname(rctx, path)
	File "/.../external/toolchain_utils~/toolchain/local/triplet/os.bzl", line 126, column 82, in _uname
		return VersionedInfo("{}.{}.{}.{}".format(kernel, int(major), int(minor), int(patch)))
Error in int: invalid base-10 literal: "114\n"
parent 18081df2
Loading
Loading
Loading
Pipeline #16977 passed with stages
in 2 minutes and 3 seconds
Loading
  • GITLAB_TOKEN @group_3575_bot_1fa64dd2caebb37307063a803b95a420

    mentioned in commit d1bbf03c

    ·

    mentioned in commit d1bbf03c

    Toggle commit list
  • GITLAB_TOKEN @group_3575_bot_1fa64dd2caebb37307063a803b95a420

    mentioned in commit c742d96b

    ·

    mentioned in commit c742d96b

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment