Skip to content

Commit

Permalink
fix: disable confirmation to create tsconfig.json on tsconfig act…
Browse files Browse the repository at this point in the history
…ion (#12)

Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone authored Dec 25, 2024
1 parent 8c88627 commit 655aad8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Console/DevToolCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function handle(Filesystem $filesystem, PackageManifest $manifest): int
'install' => $this->installNpmDependencies($filesystem, $manifest),
'enable-vue-devtool' => $this->enablesVueDevTool($filesystem, $manifest),
'disable-vue-devtool' => $this->disablesVueDevTool($filesystem, $manifest),
'tsconfig' => $this->installTypeScriptConfiguration($filesystem, $manifest),
'tsconfig' => $this->installTypeScriptConfiguration($filesystem, $manifest, confirmation: false),
default => throw new InvalidArgumentException(sprintf('Unable to handle [%s] action', $action)),
};
}
Expand All @@ -69,13 +69,13 @@ protected function installNovaWorkbench(Filesystem $filesystem, PackageManifest
/**
* Install `tsconfig.json` configuration.
*/
protected function installTypeScriptConfiguration(Filesystem $filesystem, PackageManifest $manifest): int
protected function installTypeScriptConfiguration(Filesystem $filesystem, PackageManifest $manifest, bool $confirmation = true): int
{
(new GeneratesFile(
filesystem: $filesystem,
components: $this->components,
force: false,
confirmation: true,
confirmation: $confirmation,
))->handle(
join_paths(__DIR__, 'stubs', 'tsconfig.json'),
package_path('tsconfig.json')
Expand Down Expand Up @@ -131,7 +131,7 @@ protected function installNpmDependencies(Filesystem $filesystem, PackageManifes
], package_path('tailwind.config.js'));
}

return $this->installTypeScriptConfiguration($filesystem, $manifest);
return $this->installTypeScriptConfiguration($filesystem, $manifest, confirmation: true);
}

/**
Expand Down

0 comments on commit 655aad8

Please sign in to comment.