mirror of https://github.com/actions/toolkit
Spelling (#431)
* spelling: absolute * spelling: content * spelling: received * spelling: sanitizespull/432/head
parent
df7e2c13c8
commit
7257597d73
|
@ -77,7 +77,7 @@ class Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sanatizes an input into a string so it can be passed into issueCommand safely
|
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
||||||
* @param input input to sanitize into a string
|
* @param input input to sanitize into a string
|
||||||
*/
|
*/
|
||||||
export function toCommandValue(input: any): string {
|
export function toCommandValue(input: any): string {
|
||||||
|
|
|
@ -134,7 +134,7 @@ export class Pattern {
|
||||||
// false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk.
|
// false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk.
|
||||||
if (!itemPath.endsWith(path.sep)) {
|
if (!itemPath.endsWith(path.sep)) {
|
||||||
// Note, this is safe because the constructor ensures the pattern has an absolute root.
|
// Note, this is safe because the constructor ensures the pattern has an absolute root.
|
||||||
// For example, formats like C: and C:foo on Windows are resolved to an aboslute root.
|
// For example, formats like C: and C:foo on Windows are resolved to an absolute root.
|
||||||
itemPath = `${itemPath}${path.sep}`
|
itemPath = `${itemPath}${path.sep}`
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -778,7 +778,7 @@ describe('mkdirP', () => {
|
||||||
await io.mkdirP(getTestTemp())
|
await io.mkdirP(getTestTemp())
|
||||||
await fs.mkdir(rootPath)
|
await fs.mkdir(rootPath)
|
||||||
await fs.mkdir(realDirPath)
|
await fs.mkdir(realDirPath)
|
||||||
await fs.writeFile(realFilePath, 'test real_dir/file.txt contet')
|
await fs.writeFile(realFilePath, 'test real_dir/file.txt content')
|
||||||
await createSymlinkDir(realDirPath, symlinkDirPath)
|
await createSymlinkDir(realDirPath, symlinkDirPath)
|
||||||
|
|
||||||
await io.mkdirP(symlinkDirPath)
|
await io.mkdirP(symlinkDirPath)
|
||||||
|
@ -802,7 +802,7 @@ describe('mkdirP', () => {
|
||||||
await io.mkdirP(getTestTemp())
|
await io.mkdirP(getTestTemp())
|
||||||
await fs.mkdir(rootPath)
|
await fs.mkdir(rootPath)
|
||||||
await fs.mkdir(realDirPath)
|
await fs.mkdir(realDirPath)
|
||||||
await fs.writeFile(realFilePath, 'test real_dir/file.txt contet')
|
await fs.writeFile(realFilePath, 'test real_dir/file.txt content')
|
||||||
await createSymlinkDir(realDirPath, symlinkDirPath)
|
await createSymlinkDir(realDirPath, symlinkDirPath)
|
||||||
|
|
||||||
const subDirPath = path.join(symlinkDirPath, 'sub_dir')
|
const subDirPath = path.join(symlinkDirPath, 'sub_dir')
|
||||||
|
|
|
@ -20,6 +20,6 @@ fi
|
||||||
|
|
||||||
actualContent=$(cat $path)
|
actualContent=$(cat $path)
|
||||||
if [ "$actualContent" != "$expectedContent" ];then
|
if [ "$actualContent" != "$expectedContent" ];then
|
||||||
echo "File contents are not correct, expected $expectedContent, recieved $actualContent"
|
echo "File contents are not correct, expected $expectedContent, received $actualContent"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue