File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 11/*************************************************************************************
22 * Licensed under the APACHE license
33 *
4- * Version 0.0.5 Nathan@master-technology.com
4+ * Version 0.0.6 Nathan@master-technology.com
55 ************************************************************************************/
66"use strict" ;
77
88// Simple require statements, built into node
99var fs = require ( 'fs' ) ;
1010var path = require ( 'path' ) ;
11+ var os = require ( 'os' ) ;
1112
13+ // Check for the Buggy TNS Behavior...
14+ checkIfTNSBug ( ) ;
1215
1316// Do we have detect SCSS support
1417var hasSCSS = false ;
@@ -130,4 +133,24 @@ function mkRecursiveDirectories(path) {
130133 if ( fs . existsSync ( newPath ) ) { continue ; }
131134 fs . mkdirSync ( newPath ) ;
132135 }
136+ }
137+
138+ /**
139+ * Check for The TNS double install buggy behavior...
140+ */
141+ function checkIfTNSBug ( ) {
142+ var cwd = process . cwd ( ) ;
143+ if ( cwd . indexOf ( os . tmpdir ( ) ) === 0 ) {
144+ process . exit ( 0 ) ;
145+ }
146+
147+ var env = process . env [ "TMP" ] ;
148+ if ( env && process . argv [ 1 ] . indexOf ( env ) === 0 ) {
149+ process . exit ( 0 ) ;
150+ }
151+
152+ env = process . env [ "TEMP" ] ;
153+ if ( env && process . argv [ 1 ] . indexOf ( env ) === 0 ) {
154+ process . exit ( 0 ) ;
155+ }
133156}
You can’t perform that action at this time.
0 commit comments