Don't generate default.nix if flake.nix exists

This commit is contained in:
Stéphan Kochen
2020-12-01 15:14:38 +01:00
parent 2bdaee06c6
commit ce4172544a
2 changed files with 3 additions and 2 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -124,7 +124,8 @@ export default async (project: Project, cache: Cache, report: Report) => {
// Create a wrapper if it does not exist yet.
if (configuration.get(`generateDefaultNix`)) {
const defaultExprPath = ppath.join(cwd, `default.nix` as Filename);
if (!xfs.existsSync(defaultExprPath)) {
const flakeExprPath = ppath.join(cwd, `flake.nix` as Filename);
if (!xfs.existsSync(defaultExprPath) && !xfs.existsSync(flakeExprPath)) {
xfs.writeFileSync(defaultExprPath, defaultExprTmpl);
report.reportInfo(
0,