mirror of
https://github.com/SqrtMinusOne/micromamba.el.git
synced 2025-12-10 13:23:02 +03:00
Get rid of safe-shell-command, not needed
This commit is contained in:
parent
e5596b4b4b
commit
3c63a7ddd2
1 changed files with 12 additions and 9 deletions
|
|
@ -87,12 +87,6 @@
|
|||
|
||||
(defvar eshell-path-env)
|
||||
|
||||
(defun micromamba--safe-shell-command (args &optional output-buffer error-buffer)
|
||||
"Run a shell command with ARGS OUTPUT-BUFFER ERROR-BUFFER."
|
||||
(apply 'shell-command (mapconcat 'shell-quote-argument args " ")
|
||||
output-buffer error-buffer nil))
|
||||
|
||||
|
||||
(defun micromamba--call-json (&rest args)
|
||||
"Call micromamba and parse the return value as JSON.
|
||||
|
||||
|
|
@ -101,7 +95,7 @@ Pass ARGS as arguments to the program."
|
|||
(user-error "Micromamba-executable is not set!"))
|
||||
(with-temp-buffer
|
||||
(if (file-remote-p default-directory)
|
||||
(micromamba--safe-shell-command (cons micromamba-executable args) (current-buffer))
|
||||
(shell-command (mapconcat 'identity (cons micromamba-executable args) " ") (current-buffer))
|
||||
(apply #'call-process micromamba-executable nil t nil args))
|
||||
(goto-char (point-min))
|
||||
(json-read)))
|
||||
|
|
@ -237,7 +231,11 @@ The parameters value is an alist as defined by
|
|||
`micromamba--parse-script-buffer'."
|
||||
(with-temp-buffer
|
||||
(if (file-remote-p default-directory)
|
||||
(micromamba--safe-shell-command (list micromamba-executable "shell" "activate" prefix "-s" "bash"))
|
||||
(shell-command
|
||||
(mapconcat 'identity
|
||||
(list micromamba-executable "shell"
|
||||
"activate" prefix "-s" "bash") " ")
|
||||
(current-buffer))
|
||||
(call-process micromamba-executable nil t nil
|
||||
"shell" "activate" prefix "-s" "bash"))
|
||||
(goto-char (point-min))
|
||||
|
|
@ -250,7 +248,12 @@ The parameters value is an alist as defined by
|
|||
`micromamba--parse-script-buffer'."
|
||||
(with-temp-buffer
|
||||
(if (file-remote-p default-directory)
|
||||
(micromamba--safe-shell-command (list micromamba-executable "run" "micromamba" "shell" "deactivate" "-s" "bash"))
|
||||
(shell-command
|
||||
(mapconcat 'identity
|
||||
(list micromamba-executable "run"
|
||||
"micromamba" "shell"
|
||||
"deactivate" "-s" "bash") " ")
|
||||
(current-buffer))
|
||||
(call-process micromamba-executable nil t nil
|
||||
"shell" "deactivate" "-s" "bash"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue