Fixing the path to the file
This commit is contained in:
Vendored
+3
-2
@@ -401,8 +401,9 @@ function checkForMultiModule(reactorJsonFile) {
|
||||
// TODO this is assuming the checkout was made into the base path of the workspace...
|
||||
function getRepositoryRelativePath(file) {
|
||||
const workspaceDirectory = path.resolve(process.env.GITHUB_WORKSPACE || '.');
|
||||
const fileResolved = path.dirname(path.resolve(file));
|
||||
if (fileResolved.startsWith(workspaceDirectory)) {
|
||||
const fileResolved = path.resolve(file);
|
||||
const fileDirectory = path.dirname(fileResolved);
|
||||
if (fileDirectory.startsWith(workspaceDirectory)) {
|
||||
return fileResolved.substring(workspaceDirectory.length + path.sep.length);
|
||||
}
|
||||
else {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -113,9 +113,10 @@ function checkForMultiModule(reactorJsonFile) {
|
||||
// TODO this is assuming the checkout was made into the base path of the workspace...
|
||||
function getRepositoryRelativePath(file) {
|
||||
const workspaceDirectory = path.resolve(process.env.GITHUB_WORKSPACE || '.');
|
||||
const fileResolved = path.dirname(path.resolve(file));
|
||||
const fileResolved = path.resolve(file);
|
||||
const fileDirectory = path.dirname(fileResolved);
|
||||
|
||||
if (fileResolved.startsWith(workspaceDirectory)) {
|
||||
if (fileDirectory.startsWith(workspaceDirectory)) {
|
||||
return fileResolved.substring(workspaceDirectory.length + path.sep.length);
|
||||
} else {
|
||||
return path.resolve(file);
|
||||
|
||||
Reference in New Issue
Block a user