File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const SOURCED_FILES_REG_EXP = /^(?:\t|[ ])*(?:source|[.])\s*(\S*)/gm
10
10
11
11
/**
12
12
* Analysis the given file content and returns a set of URIs that are
13
- * sourced. Note that the URIs are not resolved.
13
+ * sourced. Note that the URIs are resolved.
14
14
*/
15
15
export function getSourcedUris ( {
16
16
fileContent,
@@ -97,6 +97,12 @@ const stripQuotes = (path: string): string => {
97
97
* Tries to parse the given path and returns a URI if possible.
98
98
* - Filters out dynamic sources
99
99
* - Converts a relative paths to absolute paths
100
+ * - Converts a tilde path to an absolute path
101
+ * - Resolves the path
102
+ *
103
+ * NOTE: for future improvements:
104
+ * "If filename does not contain a slash, file names in PATH are used to find
105
+ * the directory containing filename." (see https://ss64.com/osx/source.html)
100
106
*/
101
107
function getSourcedUri ( {
102
108
rootPaths,
@@ -105,10 +111,6 @@ function getSourcedUri({
105
111
rootPaths : string [ ]
106
112
word : string
107
113
} ) : string | null {
108
- // NOTE: improvements:
109
- // - we could try to resolve the path
110
- // - "If filename does not contain a slash, file names in PATH are used to find
111
- // the directory containing filename." (see https://ss64.com/osx/source.html)
112
114
let unquotedPath = stripQuotes ( word )
113
115
114
116
if ( unquotedPath . includes ( '$' ) ) {
You can’t perform that action at this time.
0 commit comments