Skip to content

Commit b260a9f

Browse files
authored
Follow symbolic links (softprops#186)
1 parent 17cd0d3 commit b260a9f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/github.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fetch from "node-fetch";
22
import { GitHub } from "@actions/github/lib/utils";
33
import { Config, isTag, releaseBody } from "./util";
4-
import { lstatSync, readFileSync } from "fs";
4+
import { statSync, readFileSync } from "fs";
55
import { getType } from "mime";
66
import { basename } from "path";
77

@@ -127,7 +127,7 @@ export const asset = (path: string): ReleaseAsset => {
127127
return {
128128
name: basename(path),
129129
mime: mimeOrDefault(path),
130-
size: lstatSync(path).size,
130+
size: statSync(path).size,
131131
data: readFileSync(path)
132132
};
133133
};

src/util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as glob from "glob";
2-
import { lstatSync, readFileSync } from "fs";
2+
import { statSync, readFileSync } from "fs";
33

44
export interface Config {
55
github_token: string;
@@ -74,15 +74,15 @@ export const parseConfig = (env: Env): Config => {
7474
export const paths = (patterns: string[]): string[] => {
7575
return patterns.reduce((acc: string[], pattern: string): string[] => {
7676
return acc.concat(
77-
glob.sync(pattern).filter(path => lstatSync(path).isFile())
77+
glob.sync(pattern).filter(path => statSync(path).isFile())
7878
);
7979
}, []);
8080
};
8181

8282
export const unmatchedPatterns = (patterns: string[]): string[] => {
8383
return patterns.reduce((acc: string[], pattern: string): string[] => {
8484
return acc.concat(
85-
glob.sync(pattern).filter(path => lstatSync(path).isFile()).length == 0
85+
glob.sync(pattern).filter(path => statSync(path).isFile()).length == 0
8686
? [pattern]
8787
: []
8888
);

0 commit comments

Comments
 (0)