Skip to content

Commit

Permalink
fix: stop and restart commands
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed Oct 9, 2023
1 parent ba50e16 commit e7f9a5c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/commands/dev/clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export const cleanModule = async (module: Module) => {
}
};

export const handler = async (modulePackageNames?: string[]) => {
export const handler = async (modulePackageNames: string[]) => {
try {
const modules = [];
if (modulePackageNames) {
if (modulePackageNames.length) {
const allModules = await configHandler.getAllModules();
for (const moduleName of modulePackageNames) {
const module = allModules.find((m) => m.package.name === moduleName);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/dev/restart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { handler as stop } from "./stop.js";
import { track } from "../../utils/analytics.js";
import Logger from "../../utils/logger.js";

export const handler = async (modulePackageNames?: string[]) => {
export const handler = async (modulePackageNames: string[]) => {
try {
await stop(modulePackageNames);
await start();
Expand Down
4 changes: 2 additions & 2 deletions src/commands/dev/stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import configHandler from "./ConfigHandler.js";
import { track } from "../../utils/analytics.js";
import Logger from "../../utils/logger.js";

export const handler = async (modulePackageNames?: string[]) => {
export const handler = async (modulePackageNames: string[]) => {
try {
const modules = [];
if (modulePackageNames) {
if (modulePackageNames.length) {
const allModules = await configHandler.getAllModules();
for (const moduleName of modulePackageNames) {
const module = allModules.find((m) => m.package.name === moduleName);
Expand Down

0 comments on commit e7f9a5c

Please sign in to comment.