I've got this error, when running M-x ansi-term C:/Windows/System32/bash.exe RET

Spawning child process: invalid argument

after running M-x debug-on-entry RET start-process RET when running M-x ansi-term I've got this stack trace:

Debugger entered--entering a function:
* start-process("terminal" #<buffer *terminal*> "/bin/sh" "-c" "stty -nl echo rows 20 columns 97 sane 2>/dev/null;if [ $1 = .. ]; then shift; fi; exec \"$@\"" ".." "C:/Windows/System32/bash.exe")
  apply(start-process "terminal" #<buffer *terminal*> "/bin/sh" "-c" "stty -nl echo rows 20 columns 97 sane 2>/dev/null;if [ $1 = .. ]; then shift; fi; exec \"$@\"" ".." "C:/Windows/System32/bash.exe" nil)
  term-exec-1("terminal" #<buffer *terminal*> "C:/Windows/System32/bash.exe" nil)
  term-exec(#<buffer *terminal*> "terminal" "C:/Windows/System32/bash.exe" nil nil)
  make-term("terminal" "C:/Windows/System32/bash.exe")
  funcall-interactively(term "C:/Windows/System32/bash.exe")
  call-interactively(term record nil)
  command-execute(term record)
  execute-extended-command(nil "term" nil)
  funcall-interactively(execute-extended-command nil "term" nil)
  call-interactively(execute-extended-command nil nil)

It try to execute /bin/sh on Windows, is this correct? I'm using GNU Emacs 25.3.1 installed from choco.

M-x term was working but after I've try to fix ansi-term it stops, but the issue was that I have ssh-add in my .bashrc and it didn't work. I couldn't enter the pass phrase.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.