2 Replies Latest reply on Jan 17, 2017 8:25 AM by Trevorׅ

    $.getenv() on Mac

    Jump_Over Level 5



      Looking for a help from Mac users...



      returning any string on Mac or null?

      Does it depends on MacOs version?



        • 1. Re: $.getenv() on Mac
          Ronald63 Level 4

          Hi Jarek,


          $.getenv('os') // return null
          $.os // return Macintosh OS 10.12.2
          Folder.fs  // return Macintosh
          1 person found this helpful
          • 2. Re: $.getenv() on Mac
            Trevorׅ Adobe Community Professional

            Hi Jarek.


            Windows and Mac have different environmental variables, that explains the result.

            Take the user name for example.

            var userName = $.getenv($.os[0] == "M" ? "USER" : "username");

            On Mac "USER" on Windows "username"

            For a list of mac envs in terminal type: printenv

            For windows from cmd (command promt) type: SET


            The windows one is quite easy to remember


            So in short there's no env on the mac called 'os'





            1 person found this helpful