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

linux - "subl -w" as git editor - Failed to receive exit code from application on "ctrl+q" #6502

Open
vliska opened this issue Oct 1, 2024 · 6 comments

Comments

@vliska
Copy link

vliska commented Oct 1, 2024

Description of the bug

Sublime text fails to provide exit code to git when used as editor (subl -w) on exit (ctrl+q).

Steps to reproduce

preconditions:

sublime-text 4180, installed from https://www.sublimetext.com/docs/linux_repositories.html#apt

clean install, no plugins, started in safe mode

git 2.34.1

git config --global core.editor "subl -w"

mkdir /tmp/test
cd /tmp/test
git init
echo "test" >> test
git add .
git commit

... edit in sublime, save (ctrl+s), quit (ctrl+q)
result:

hint: Waiting for your editor to close the file... Failed to receive exit code from application
error: There was a problem with the editor 'subl -w'.
Please supply the message using either -m or -F option.

If I close with ctrl+w, then quit with ctrl+q, it works just fine.

Expected result:
return code 0 is provided to git, files are committed

Actual result:

> git commit
hint: Waiting for your editor to close the file... Failed to receive exit code from application
error: There was a problem with the editor 'subl -w'.
Please supply the message using either -m or -F option.

Expected behavior

return code 0 is provided to git, files are committed

Actual behavior

> git commit
hint: Waiting for your editor to close the file... Failed to receive exit code from application
error: There was a problem with the editor 'subl -w'.
Please supply the message using either -m or -F option.

Sublime text fails to provide exit code to the application (or exits with code <> 0).

Sublime Text build number

4180

Operating system & version

Ubuntu 22.04.5

(Linux) Desktop environment and/or window manager

i3, WSL2, gnome ... all affected

Additional information

No response

OpenGL context information

No response

@BenjaminSchaaf
Copy link
Member

Do you see any errors in the console (View > Show Console)? What version is the command line tool (subl --version)?

@vliska
Copy link
Author

vliska commented Oct 1, 2024

No errors in console.

> subl --version
Sublime Text Build 4180

Actually testing also with

git config --global core.editor "subl --safe-mode -w"

as git editor - same behavior.

Console output:

startup, version: 4180 linux x64 channel: stable
SAFE MODE - overriding packages, state and cache paths
executable: /opt/sublime_text/sublime_text
application: /opt/sublime_text
working dir: <redacted>
packages path: /<redacted>/.config/sublime-text-safe-mode/Packages
state path: /<redacted>/.config/sublime-text-safe-mode/Local
zip path: /opt/sublime_text/Packages
zip path: /<redacted>/.config/sublime-text-safe-mode/Installed Packages
ignored_packages: ["Vintage"]
generating syntax summary
generating meta info summary
pre session restore time: 1.05421
startup time: 1.09233
first paint time: 1.12589
git: using configuration from system git install
git: tracking working dir <redacted>
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
plugins loaded

@vliska
Copy link
Author

vliska commented Oct 1, 2024

By the way same behavior is when using it as EDITOR linux (e.g. for kubectl edit) and it is regression from last 3.x Sublime, where it works just fine (3211 I believe).

export EDITOR='subl -w'

@themilkman
Copy link

themilkman commented Oct 2, 2024

I think it behaves the same way here, closing ST with alt+f4 works though (which I think I always do).

("native" Kubuntu 24.04)

@BenjaminSchaaf
Copy link
Member

To clarify: Are you using ubuntu 22.04 directly or under WSL2 with a Windows X Server?

@vliska
Copy link
Author

vliska commented Oct 2, 2024

Both. It happens both in WSL2 (Ubuntu 22.04 under WSL2) and in native Linux Ubuntu 22.04.5 (my second machine).

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

3 participants