File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,14 +57,22 @@ When this is nil, the default of '/workspaces/<repo-name>' is used."
5757 " Set up the ghcs tramp-method. Should be called after requiring this package."
5858 (interactive )
5959 (with-current-buffer (get-buffer-create " *codespaces-output*" )
60- (special-mode ))
60+ (special-mode ))
6161 (unless (executable-find " gh" )
6262 (user-error " Could not find `gh' program in your PATH" ))
6363 (unless (featurep 'json )
6464 (user-error " Emacs JSON support not available; your Emacs is too old" ))
65- (let ((status (call-process " gh" nil nil nil " codespace" " list" )))
66- (unless (zerop status)
67- (user-error " Command `gh codespace list` failed\n Please run `gh codespace list` directly in a terminal to see more details" )))
65+ (let ((status
66+ (let ((inhibit-read-only t ))
67+ (shell-command
68+ (if (eq system-type 'windows-nt )
69+ " gh codespace list 1>NUL"
70+ " gh codespace list 1>/dev/null" )
71+ nil " *codespaces-output*" ))))
72+ (unless (zerop status)
73+ (user-error
74+ (concat " Command `gh codespace list` failed ... "
75+ " [See *codespaces-output* buffer for details]" ))))
6876 (let ((ghcs (assoc " ghcs" tramp-methods))
6977 (ghcs-methods '((tramp-login-program " gh" )
7078 (tramp-login-args ((" codespace" ) (" ssh" ) (" -c" ) (" %h" )))
You can’t perform that action at this time.
0 commit comments