Don't generate default.nix if flake.nix exists
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+2
-1
@@ -124,7 +124,8 @@ export default async (project: Project, cache: Cache, report: Report) => {
|
|||||||
// Create a wrapper if it does not exist yet.
|
// Create a wrapper if it does not exist yet.
|
||||||
if (configuration.get(`generateDefaultNix`)) {
|
if (configuration.get(`generateDefaultNix`)) {
|
||||||
const defaultExprPath = ppath.join(cwd, `default.nix` as Filename);
|
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);
|
xfs.writeFileSync(defaultExprPath, defaultExprTmpl);
|
||||||
report.reportInfo(
|
report.reportInfo(
|
||||||
0,
|
0,
|
||||||
|
|||||||
Reference in New Issue
Block a user