YARN-8812. Containers fail during creating a symlink which started with hyphen for a resource file. Contributed by Oleksandr Shevchenko
(cherry picked from commit 3ce99e32f7d7887412cae8337cd4ebeb3b2ee308)
This commit is contained in:
parent
7dac294110
commit
e4dcc3e606
@ -1199,7 +1199,7 @@ public void echo(final String echoStr) throws IOException {
|
||||
|
||||
@Override
|
||||
protected void link(Path src, Path dst) throws IOException {
|
||||
line("ln -sf \"", src.toUri().getPath(), "\" \"", dst.toString(), "\"");
|
||||
line("ln -sf -- \"", src.toUri().getPath(), "\" \"", dst.toString(), "\"");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -152,7 +152,7 @@ public void testSpecialCharSymlinks() throws IOException {
|
||||
File shellFile = null;
|
||||
File tempFile = null;
|
||||
String badSymlink = Shell.WINDOWS ? "foo@zz_#!-+bar.cmd" :
|
||||
"foo@zz%_#*&!-+= bar()";
|
||||
"-foo@zz%_#*&!-+= bar()";
|
||||
File symLinkFile = null;
|
||||
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user