Interpret any installable containing a slash as a path
So "nix path-info ./result" now works.
This commit is contained in:
		
							parent
							
								
									7ee81f3887
								
							
						
					
					
						commit
						0b6220fbd6
					
				
					 1 changed files with 7 additions and 11 deletions
				
			
		|  | @ -183,20 +183,16 @@ std::vector<std::shared_ptr<Installable>> InstallablesCommand::parseInstallables | |||
| 
 | ||||
|     for (auto & installable : installables) { | ||||
| 
 | ||||
|         if (std::string(installable, 0, 1) == "/") { | ||||
|         if (installable.find("/") != std::string::npos) { | ||||
| 
 | ||||
|             if (store->isStorePath(installable)) { | ||||
|                 if (isDerivation(installable)) | ||||
|                     result.push_back(std::make_shared<InstallableStoreDrv>(installable)); | ||||
|             auto path = store->toStorePath(store->followLinksToStore(installable)); | ||||
| 
 | ||||
|             if (store->isStorePath(path)) { | ||||
|                 if (isDerivation(path)) | ||||
|                     result.push_back(std::make_shared<InstallableStoreDrv>(path)); | ||||
|                 else | ||||
|                     result.push_back(std::make_shared<InstallableStorePath>(installable)); | ||||
|                     result.push_back(std::make_shared<InstallableStorePath>(path)); | ||||
|             } | ||||
| 
 | ||||
|             else { | ||||
|                 result.push_back(std::make_shared<InstallableStorePath>( | ||||
|                         store->toStorePath(store->followLinksToStore(installable)))); | ||||
|             } | ||||
| 
 | ||||
|         } | ||||
| 
 | ||||
|         else if (installable.compare(0, 1, "(") == 0) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue