scope issue
This commit is contained in:
		
							parent
							
								
									3a6e75776d
								
							
						
					
					
						commit
						e026e44e52
					
				
					 2 changed files with 10 additions and 4 deletions
				
			
		|  | @ -11,16 +11,19 @@ if not fs.exists(temp) then | |||
|     fs.makeDir(temp) | ||||
| end | ||||
| 
 | ||||
| local programToInstall = nil | ||||
| if #args > 0 then | ||||
|     local programToInstall = args[1] | ||||
|     programToInstall = args[1] | ||||
| else | ||||
|     print("usage:") | ||||
|     print("install.lua <project>") | ||||
|     print("install.lua <project> <custom install path>") | ||||
| end | ||||
| 
 | ||||
| local customPath = nil | ||||
| if #args > 1 then | ||||
|     print("WARNING: custom paths are currently not supported.") | ||||
|     local customPath = shell.resolve(args[2]) | ||||
|     customPath = shell.resolve(args[2]) | ||||
| end | ||||
| 
 | ||||
| local function downloadFile(program, filename) | ||||
|  |  | |||
|  | @ -11,12 +11,15 @@ if not fs.exists(temp) then | |||
|     fs.makeDir(temp) | ||||
| end | ||||
| 
 | ||||
| local programToInstall = nil | ||||
| if #args > 0 then | ||||
|     local programToInstall = args[1] | ||||
|     programToInstall = args[1] | ||||
| end | ||||
| 
 | ||||
| local customPath = nil | ||||
| if #args > 1 then | ||||
|     print("WARNING: custom paths are currently not supported.") | ||||
|     local customPath = shell.resolve(args[2]) | ||||
|     customPath = shell.resolve(args[2]) | ||||
| end | ||||
| 
 | ||||
| local function downloadFile(program, filename) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue