File tree 1 file changed +2
-13
lines changed
1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -190,21 +190,12 @@ function binary-task() {
190
190
log " Binary: ${buildPath} /${binaryName} "
191
191
}
192
192
193
- function absolute-path() {
194
- local relative=" ${1} " ; shift
195
- if command -v realpath & > /dev/null ; then
196
- realpath " ${relative} "
197
- else
198
- readlink -f " ${relative} "
199
- fi
200
- }
201
-
202
193
# Check if it looks like we are inside VS Code.
203
194
function in-vscode () {
204
195
local dir=" ${1} " ; shift
205
196
local maybeVsCode
206
197
local dirName
207
- maybeVsCode=" $( absolute-path " ${dir} /../../.." ) "
198
+ maybeVsCode=" $( cd " ${dir} /../../.." ; pwd -P ) "
208
199
dirName=" $( basename " ${maybeVsCode} " ) "
209
200
if [[ " ${dirName} " != " vscode" ]] ; then
210
201
return 1
@@ -219,10 +210,8 @@ function in-vscode () {
219
210
}
220
211
221
212
function main() {
222
- local relativeRootPath
223
213
local rootPath
224
- relativeRootPath=" $( dirname " ${0} " ) /.."
225
- rootPath=" $( absolute-path " ${relativeRootPath} " ) "
214
+ rootPath=" $( cd " $( dirname " ${0} /.." ) " ; pwd -P) "
226
215
227
216
local task=" ${1} " ; shift
228
217
if [[ " ${task} " == " ensure-in-vscode" ]] ; then
You can’t perform that action at this time.
0 commit comments