Skip to content

fix: version reported by srt --version#135

Open
MarlzRana wants to merge 1 commit intoanthropic-experimental:mainfrom
MarlzRana:marlzrana/fix-version-reported-by-`version`-flag
Open

fix: version reported by srt --version#135
MarlzRana wants to merge 1 commit intoanthropic-experimental:mainfrom
MarlzRana:marlzrana/fix-version-reported-by-`version`-flag

Conversation

@MarlzRana
Copy link

@MarlzRana MarlzRana commented Feb 15, 2026

The version reported by srt --version is incorrect.

This makes the brew formula look peculiar (see the test):

class SandboxRuntime < Formula
  desc "Lightweight sandboxing tool for filesystem and network restrictions"
  homepage "https://github.com/anthropic-experimental/sandbox-runtime"
  url "https://registry.npmjs.org/@anthropic-ai/sandbox-runtime/-/sandbox-runtime-0.0.37.tgz"
  sha256 "0ee00dbedeeb05c46e6c320d3d33de444cbafa2dd3345cafc15b06f549f65fa0"
  license "Apache-2.0"

  depends_on "node"

  on_linux do
    depends_on "bubblewrap"
  end

  def install
    system "npm", "install", *std_npm_args
    bin.install_symlink libexec.glob("bin/*")
  end

  test do
    assert_match "1.0.0", shell_output("#{bin}/srt --version")
    assert_match "Run commands in a sandbox", shell_output("#{bin}/srt --help")
  end
end

Let's fix that! 😄

Fixes issue: #119

@MarlzRana MarlzRana changed the title Fix Version Reported by --version Flag fix:Version Reported by --version Flag Feb 15, 2026
@MarlzRana MarlzRana changed the title fix:Version Reported by --version Flag fix:version reported by --version flag Feb 15, 2026
@MarlzRana MarlzRana changed the title fix:version reported by --version flag fix: version reported by --version flag Feb 15, 2026
@MarlzRana MarlzRana force-pushed the marlzrana/fix-version-reported-by-`version`-flag branch from f409f48 to 2545529 Compare February 15, 2026 22:51
@MarlzRana MarlzRana changed the title fix: version reported by --version flag fix: version reported by srt --version Feb 15, 2026
@MarlzRana MarlzRana force-pushed the marlzrana/fix-version-reported-by-`version`-flag branch from 2545529 to 1b8cf97 Compare February 15, 2026 23:19
.description(
'Run commands in a sandbox with network and filesystem restrictions',
)
.version(process.env.npm_package_version || '1.0.0')
Copy link
Author

@MarlzRana MarlzRana Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

process.env.npm_package_version is null when you do not invoke it via npm (e.g srt echo "Hello world!").

@sysid
Copy link

sysid commented Feb 21, 2026

@Mainainers, this is an annoying inconsistency with a simple fix. Please merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants