[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/exec-path-from-shell 6be6e33bbe 057/114: Demote the warnin
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/exec-path-from-shell 6be6e33bbe 057/114: Demote the warning to a message |
Date: |
Tue, 5 Sep 2023 04:00:00 -0400 (EDT) |
branch: elpa/exec-path-from-shell
commit 6be6e33bbe735ebba64a0feab346076a3703b938
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>
Demote the warning to a message
---
exec-path-from-shell.el | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index 315b0d3683..8e72442e01 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -188,23 +188,25 @@ variables such as `exec-path'."
As a special case, if the variable is $PATH, then `exec-path' and
`eshell-path-env' are also set appropriately. The result is an alist,
as described by `exec-path-from-shell-getenvs'."
- (let ((pairs (exec-path-from-shell-getenvs names))
- (without-minus-i (remove "-i" exec-path-from-shell-arguments)))
+ (let ((pairs (exec-path-from-shell-getenvs names)))
+ (exec-path-from-shell--maybe-warn-about-startup-files pairs)
+ (mapc (lambda (pair)
+ (exec-path-from-shell-setenv (car pair) (cdr pair)))
+ pairs)))
+(defun exec-path-from-shell--maybe-warn-about-startup-files (pairs)
+ "Warn the user if the value of PAIRS seems to depend on interactive shell
startup files."
+ (let ((without-minus-i (remove "-i" exec-path-from-shell-arguments)))
;; If the user is using "-i", we warn them if it is necessary.
(unless (eq exec-path-from-shell-arguments without-minus-i)
(let* ((exec-path-from-shell-arguments without-minus-i)
- (alt-pairs (exec-path-from-shell-getenvs names))
+ (alt-pairs (exec-path-from-shell-getenvs (mapcar 'car pairs)))
different)
(dolist (pair pairs)
(unless (equal pair (assoc (car pair) alt-pairs))
(push (car pair) different)))
(when different
- (warn "You appear to be setting environment variables %S in your
.bashrc or .zshrc: those files are only read by interactive shells, so you
should instead set environment variables in startup files like .bash_profile or
.zshenv. Refer to your shell's man page for more info. In future,
exec-path-from-shell will not read variables set in the wrong files."
different))))
-
- (mapc (lambda (pair)
- (exec-path-from-shell-setenv (car pair) (cdr pair)))
- pairs)))
+ (message "You appear to be setting environment variables %S in your
.bashrc or .zshrc: those files are only read by interactive shells, so you
should instead set environment variables in startup files like .bash_profile or
.zshenv. Refer to your shell's man page for more info. In future,
exec-path-from-shell will not read variables set in the wrong files."
different))))))
;;;###autoload
(defun exec-path-from-shell-copy-env (name)
- [nongnu] elpa/exec-path-from-shell 3ff20e8d60 028/114: Update copyright year, (continued)
- [nongnu] elpa/exec-path-from-shell 3ff20e8d60 028/114: Update copyright year, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 49219e9425 029/114: Append exec-directory to exec-path, as is conventional, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 247683134a 035/114: Include shell output in debug messages, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 4f90eff044 039/114: Include shell output in error upon non-zero exit, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 54c1d4a0c6 047/114: Don't break if $SHELL is unset at load-time, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell e381af89a7 048/114: Note about inheriting of environment variables, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 4c328130ec 049/114: Remove unnecessary dash to appease old csh, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 63a88bfb4f 055/114: Warn users if the "-i" arg makes a difference given their startup files, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 5836fb1656 066/114: Drop mention of marmalade, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 17fe8465cd 063/114: Merge pull request #44 from ksjogo/master, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 6be6e33bbe 057/114: Demote the warning to a message,
ELPA Syncer <=
- [nongnu] elpa/exec-path-from-shell 731d805ed3 072/114: Also run exec-path-from-shell-initialize on Linux in example, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 5e355fbc50 076/114: Merge pull request #68 from timhillgit/master, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 20ad9805fd 077/114: Add Patreon badge, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 4d0af12747 081/114: Merge pull request #77 from jabranham/byte-compile, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell d8aa7765a1 084/114: Merge pull request #82 from mernst/installation-instructions, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 53ca76b97f 089/114: Link to flowbok article about shell startup files, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 3cfedb8791 088/114: Merge pull request #90 from lassik/error-if-remote, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 2d152d1781 095/114: Clarify what the sample usage snippet does, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell ad68d36747 102/114: Instead of checking startup files, just warn if execution is slow, ELPA Syncer, 2023/09/05
- [nongnu] elpa/exec-path-from-shell 6336db9be1 111/114: Add Emacs 28.1 to CI matrix, ELPA Syncer, 2023/09/05