mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 09:04:05 +02:00
[ruby/fileutils] If noop
, return before checking the argument
Get rid of failure in rbs.
e44b7b366c
This commit is contained in:
parent
eeb682c51b
commit
7725442022
1 changed files with 1 additions and 1 deletions
|
@ -733,6 +733,7 @@ module FileUtils
|
||||||
def ln_sr(src, dest, target_directory: true, force: nil, noop: nil, verbose: nil)
|
def ln_sr(src, dest, target_directory: true, force: nil, noop: nil, verbose: nil)
|
||||||
fu_output_message "ln -sr#{force ? 'f' : ''}#{
|
fu_output_message "ln -sr#{force ? 'f' : ''}#{
|
||||||
target_directory ? '' : 'T'} #{[src,dest].flatten.join ' '}" if verbose
|
target_directory ? '' : 'T'} #{[src,dest].flatten.join ' '}" if verbose
|
||||||
|
return if noop
|
||||||
unless target_directory
|
unless target_directory
|
||||||
destdirs = fu_split_path(File.realdirpath(dest))
|
destdirs = fu_split_path(File.realdirpath(dest))
|
||||||
end
|
end
|
||||||
|
@ -754,7 +755,6 @@ module FileUtils
|
||||||
end
|
end
|
||||||
s = File.join(*base, *srcdirs)
|
s = File.join(*base, *srcdirs)
|
||||||
end
|
end
|
||||||
next if noop
|
|
||||||
remove_file d, true if force
|
remove_file d, true if force
|
||||||
File.symlink s, d
|
File.symlink s, d
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue