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

detach mode seems not working with 0.3.5 release #129

Open
chenrui333 opened this issue Oct 11, 2024 · 5 comments
Open

detach mode seems not working with 0.3.5 release #129

chenrui333 opened this issue Oct 11, 2024 · 5 comments

Comments

@chenrui333
Copy link

👋 while bumping smug to 0.3.5 release, seeing some regression test issue with the detached mode

  ==> /opt/homebrew/Cellar/smug/0.3.5/bin/smug start --file /private/tmp/smug-test-20241011-9211-e5yqxb/test.yml --detach
  Starting a new session...
  1049h1h25h1000l1002l1003l1006l1005l2004h�25h1006l1000l1002l1003lcq25lbrew@Sequoia-arm64 ~ % 

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/11295405800/job/31418666575?pr=193749

relates to Homebrew/homebrew-core#193749

@ivaaaan
Copy link
Owner

ivaaaan commented Oct 12, 2024

Hey. I think the problem is that the path is not correct. This patch should fix it

  test do
    (testpath/".config/smug/test.yml").write <<~EOF
      session: homebrew-test-session
      root: .
      windows:
        - name: test
    EOF

    assert_equal(version, shell_output(bin/"smug").lines.first.split("Version").last.chomp)

    with_env(TERM: "screen-256color") do
-      system bin/"smug", "start", "--file", testpath/"test.yml", "--detach"
+      system bin/"smug", "start", "--file", testpath/".config/smug/test.yml", "--detach"
    end

    assert_empty shell_output("tmux has-session -t homebrew-test-session")
    system "tmux", "kill-session", "-t", "homebrew-test-session"
  end

@chenrui333
Copy link
Author

@ivaaaan sorry about the delay, and thanks for the pointer, I am gonna retry the PR now. 🙏

@chenrui333
Copy link
Author

still the same error

==> Testing smug
/opt/homebrew/Library/Homebrew/test.rb (Formulary::FromPathLoader): loading /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/s/smug.rb
==> /opt/homebrew/Cellar/smug/0.3.5/bin/smug
==> /opt/homebrew/Cellar/smug/0.3.5/bin/smug start --file /private/tmp/smug-test-20241030-8346-biw54d/.config/smug/test.yml --detach
Starting a new session...
[exited]
==> tmux has-session -t homebrew-test-session
no server running on /private/tmp/tmux-501/default

/opt/homebrew/Library/Homebrew/ignorable.rb:27:in `block in raise'
Minitest::Assertion: Expected: 0
  Actual: 1

@chenrui333
Copy link
Author

cc @ivaaaan

@ivaaaan
Copy link
Owner

ivaaaan commented Nov 20, 2024

The error is different now that. I couldn't reproduce this with the test config on my machine. Help would be appreciated, I don't know much details on how homebrew runs its tests.

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

No branches or pull requests

2 participants