Use simplified `os.path.dirname` to traverse up
@@ -97,7 +97,7 @@ class ComposerLinter(linter.Linter):
if os.path.isfile(manifest_path) and os.path.isdir(bin_path):
return manifest_path
- parent = os.path.normpath(os.path.join(cwd, '../'))
+ parent = os.path.dirname(cwd)
if parent == '/' or parent == cwd:
return None
@@ -128,7 +128,7 @@ class ComposerLinter(linter.Linter):
if binary:
return binary
- parent = os.path.normpath(os.path.join(cwd, '../'))
+ parent = os.path.dirname(cwd)
if parent == '/' or parent == cwd:
return None
