Skip to content

Commit e7ed98d

Browse files
committed
Fix bug when provided relative paths
1 parent 9e7e85b commit e7ed98d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/make/lib/lint/typescript/dtslint.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ ifeq ($(FAIL_FAST), true)
7070
$(QUIET) $(FIND_TYPESCRIPT_DECLARATIONS_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
7171
echo ''; \
7272
echo "Linting file: $$file"; \
73+
cd $(ROOT_DIR); \
7374
$(CP) -R "$$(dirname $$file)/" $(DTSLINT_OUT); \
7475
cd $(DTSLINT_OUT); \
7576
$(DTSLINT) $(DTSLINT_FLAGS) || exit 1; \
@@ -81,6 +82,7 @@ else
8182
$(QUIET) $(FIND_TYPESCRIPT_DECLARATIONS_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
8283
echo ''; \
8384
echo "Linting file: $$file"; \
85+
cd $(ROOT_DIR); \
8486
$(CP) -R "$$(dirname $$file)/" $(DTSLINT_OUT); \
8587
cd $(DTSLINT_OUT); \
8688
$(DTSLINT) $(DTSLINT_FLAGS) || echo 'Linting failed.'; \
@@ -113,6 +115,7 @@ ifeq ($(FAIL_FAST), true)
113115
$(QUIET) for file in $(FILES); do \
114116
echo ''; \
115117
echo "Linting file: $$file"; \
118+
cd $(ROOT_DIR); \
116119
$(CP) -R "$$(dirname $$file)/" $(DTSLINT_OUT); \
117120
cd $(DTSLINT_OUT); \
118121
$(DTSLINT) $(DTSLINT_FLAGS) || exit 1; \
@@ -124,6 +127,7 @@ else
124127
$(QUIET) for file in $(FILES); do \
125128
echo ''; \
126129
echo "Linting file: $$file"; \
130+
cd $(ROOT_DIR); \
127131
$(CP) -R "$$(dirname $$file)/" $(DTSLINT_OUT); \
128132
cd $(DTSLINT_OUT); \
129133
$(DTSLINT) $(DTSLINT_FLAGS) || echo 'Linting failed.'; \

0 commit comments

Comments
 (0)