Skip to content

Commit

Permalink
Use writefile() instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Nov 5, 2023
1 parent 4608840 commit c87a58a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions denops/dpp/dpp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
Denops,
dirname,
extname,
fn,
is,
join,
vars,
Expand Down Expand Up @@ -374,7 +375,8 @@ export class Dpp {

// Write state file
const stateFile = `${basePath}/${name}/state.vim`;
await Deno.writeTextFile(stateFile, stateLines.join("\n"));
// NOTE: Deno.writeTextFile does not work in Windows.
await fn.writefile(denops, stateLines.join("\n"), stateFile);

const cacheFile = `${basePath}/${name}/cache.vim`;
const cacheLines = [
Expand All @@ -385,7 +387,8 @@ export class Dpp {
checkFiles,
]),
];
await Deno.writeTextFile(cacheFile, cacheLines.join("\n"));
// NOTE: Deno.writeTextFile does not work in Windows.
await fn.writefile(denops, cacheLines.join("\n"), cacheFile);

//console.log(stateLines);
//console.log(cacheLines);
Expand All @@ -406,7 +409,8 @@ export class Dpp {
await Deno.mkdir(parent, { recursive: true });
}

await Deno.writeTextFile(path, generatedFtplugins[path].join("\n"));
// NOTE: Deno.writeTextFile does not work in Windows.
await fn.writefile(denops, generatedFtplugins[path].join("\n"), path);
}
}

Expand Down

0 comments on commit c87a58a

Please sign in to comment.