Stow: Only show unwrap message if targets are folders
This commit is contained in:
		@@ -55,14 +55,18 @@ readonly class stow
 | 
				
			|||||||
            if ($targetLink === $stowFile) {
 | 
					            if ($targetLink === $stowFile) {
 | 
				
			||||||
                line("File $targetFile is already stowed from $stowFile");
 | 
					                line("File $targetFile is already stowed from $stowFile");
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                if ($this->unwrap) {
 | 
					                if (is_dir($targetFile)) {
 | 
				
			||||||
                    line("Unwrapping $targetFile from $targetLink");
 | 
					                    if ($this->unwrap) {
 | 
				
			||||||
                    unlink($targetFile);
 | 
					                        line("Unwrapping $targetFile from $targetLink");
 | 
				
			||||||
                    mkdir($targetFile);
 | 
					                        unlink($targetFile);
 | 
				
			||||||
                    $this->run($targetLink, $targetFile);
 | 
					                        mkdir($targetFile);
 | 
				
			||||||
                    $this->run($stowFile, $targetFile);
 | 
					                        $this->run($targetLink, $targetFile);
 | 
				
			||||||
                } else {
 | 
					                        $this->run($stowFile, $targetFile);
 | 
				
			||||||
                    line("File $targetFile is linked from $targetLink, ignoring, add -w to unwrap");
 | 
					                    } else {
 | 
				
			||||||
 | 
					                        line("File $targetFile is linked from $targetLink, ignoring, add -w to unwrap");
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }else{
 | 
				
			||||||
 | 
					                    line("File $targetFile is already linked from $targetLink");
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user