[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Running different codes for different systems
- From: Patrick Rapin <toupie300@...>
- Date: Wed, 5 Jan 2011 16:54:18 +0100
> if os.getenv('OS')=='Windows_NT' then
This is probably the better test indeed.
I wanted to note there there is a special case with Cygwin.
Cygwin is an emulation of Unix under Windows, on which both common
Windows and Unix environment variables are defined.
On this platform, package.config:sub(1,1)=='/' like on Linux, but
os.getenv('OS')=='Windows_NT' like on native Windows.
So the choice for the correct test depends on whether Cygwin shall be
seen as Windows or Unix.