Skip to content

Commit 203d982

Browse files
adrumd8vjork
authored andcommitted
switch to async
1 parent 9560f7f commit 203d982

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PintEditService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { readFile } from "fs-extra";
22
import path = require("node:path");
3-
import fs = require("node:fs");
3+
import fs = require("node:fs/promises");
44
import { Disposable, TextEditor, Uri, workspace, languages, RelativePattern, TextDocument, TextEdit, WorkspaceFolder, window, FileSystemWatcher } from "vscode";
55
import { CONFIG_FILE_NAME } from "./constants";
66
import { LoggingService } from "./LoggingService";
@@ -181,7 +181,7 @@ export default class PintEditService implements Disposable {
181181
}
182182

183183
public async formatFile(file: Uri, isFormatWorkspace = false) {
184-
let filePath = fs.realpathSync.native(file.fsPath);
184+
let filePath = await fs.realpath(file.fsPath);
185185

186186
if (this.isDocumentExcluded(file)) {
187187
this.loggingService.logWarning(`The file "${filePath}" is excluded either by you or by Laravel Pint`);

0 commit comments

Comments
 (0)