From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13225 invoked by alias); 31 Jul 2015 18:53:33 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20375 Received: (qmail 12702 invoked from network); 31 Jul 2015 18:53:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VVaXx9MQRP1RV8uywedF7VQGsDrDIvwkcs/IV+vTZH4=; b=CZO93H8A66K8XpBJRQMuioa6Pm4dEH4GwLY3hN1EqHHYJ0BaH61Sf/kcLNrI1YM8kw RmwVPJnnsyuYBFbWU8OUM+mLN91Zo846LSH+M7Gsjw7fU3EReK2Hy0qK7K58j8G7uKbw tAF7iaQIwHfP6U7GjN1H4W1PNsTjHPeVXtJ+H67xkLcgRcNU0HSARO6Da5WN4Pcthvx5 9JblCkSo2ZVUkZv2gBpE8TgudE3De8IBPcqzBWC3DJpyfyMMtOf40qmUkOtrVjFOfF/p LJ8F2cJP54nhpwAMashZ1dqvEA5+tcrX4mjEVYRkunca5qEgJd1h8rkCNv0FX2oa4jw5 YhTw== MIME-Version: 1.0 X-Received: by 10.50.103.73 with SMTP id fu9mr8491785igb.46.1438368808175; Fri, 31 Jul 2015 11:53:28 -0700 (PDT) In-Reply-To: References: Date: Fri, 31 Jul 2015 20:53:28 +0200 Message-ID: Subject: Re: PSA: Mac OS X El Capitan upgrade might break your $PATH From: Mikael Magnusson To: Kurtis Rader Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On Fri, Jul 31, 2015 at 6:35 PM, Kurtis Rader wrote: > A public service announcement for those running Zsh on Mac OS X. > > Upgrading to El Capitan (OS X 10.11) will install a /etc/zprofile that > contains > > # system-wide environment settings for zsh(1) > if [ -x /usr/libexec/path_helper ]; then > eval `/usr/libexec/path_helper -s` > fi > > On a new login shell that will be sourced after your $HOME/.zshenv. If you > set your $PATH in your .zshenv the /usr/libexec/path_helper program will > alter the order of the directories. The order appears random so it's > probably using a hashed set to avoid having the same directory appear more > than once in the result. > > You can't remove /usr/libexec/path_helper due to the new security > mechanisms (at least not without booting from a recovery disk) but you can > remove /etc/zprofile which is what I did to keep my $PATH from being mucked > with. That's good news, they used to have that code in /etc/zshenv which meant you had _no_ way to override it. It only took them a few years to fix this. As a sidenote, it's not a great idea to set your path in .zshenv, you should probably move those settings to your .zprofile. (Otherwise, running a script that uses zsh will not use the $PATH from the environment, which can break things in some situations). -- Mikael Magnusson