Skip to content

Commit

Permalink
fix: allow execution of commands in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz committed May 2, 2024
1 parent 2cdd649 commit 4ce7ea6
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 31 deletions.
5 changes: 0 additions & 5 deletions src/commands/apps/bundles/delete.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defineCommand } from 'citty';
import consola from 'consola';
import { AxiosError } from 'axios';
import { isRunningInCi } from '../../../utils/ci';
import appsService from '../../../services/apps';
import { prompt } from '../../../utils/prompt';
import appBundlesService from '../../../services/app-bundle';
Expand All @@ -21,10 +20,6 @@ export default defineCommand({
},
},
run: async (ctx) => {
if (isRunningInCi()) {
consola.error('This command is not supported in CI environments.');
return;
}
let appId = ctx.args.appId;
if (!appId) {
const apps = await appsService.findAll();
Expand Down
5 changes: 0 additions & 5 deletions src/commands/apps/channels/create.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineCommand } from 'citty';
import { isRunningInCi } from '../../../utils/ci';
import consola from 'consola';
import { prompt } from '../../../utils/prompt';
import appsService from '../../../services/apps';
Expand All @@ -21,10 +20,6 @@ export default defineCommand({
},
},
run: async (ctx) => {
if (isRunningInCi()) {
consola.error('This command is not supported in CI environments.');
return;
}
let appId = ctx.args.appId;
if (!appId) {
const apps = await appsService.findAll();
Expand Down
5 changes: 0 additions & 5 deletions src/commands/apps/channels/delete.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defineCommand } from 'citty';
import consola from 'consola';
import { AxiosError } from 'axios';
import { isRunningInCi } from '../../../utils/ci';
import appsService from '../../../services/apps';
import { prompt } from '../../../utils/prompt';
import appChannelsService from '../../../services/app-channel';
Expand All @@ -21,10 +20,6 @@ export default defineCommand({
},
},
run: async (ctx) => {
if (isRunningInCi()) {
consola.error('This command is not supported in CI environments.');
return;
}
let appId = ctx.args.appId;
if (!appId) {
const apps = await appsService.findAll();
Expand Down
5 changes: 0 additions & 5 deletions src/commands/apps/create.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineCommand } from 'citty';
import { isRunningInCi } from '../../utils/ci';
import consola from 'consola';
import { prompt } from '../../utils/prompt';
import appsService from '../../services/apps';
Expand All @@ -16,10 +15,6 @@ export default defineCommand({
},
},
run: async (ctx) => {
if (isRunningInCi()) {
consola.error('This command is not supported in CI environments.');
return;
}
let name = ctx.args.name;
if (!name) {
name = await prompt('Enter the name of the app:', { type: 'text' });
Expand Down
5 changes: 0 additions & 5 deletions src/commands/apps/delete.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineCommand } from 'citty';
import { isRunningInCi } from '../../utils/ci';
import consola from 'consola';
import { prompt } from '../../utils/prompt';
import appsService from '../../services/apps';
Expand All @@ -16,10 +15,6 @@ export default defineCommand({
},
},
run: async (ctx) => {
if (isRunningInCi()) {
consola.error('This command is not supported in CI environments.');
return;
}
let appId = ctx.args.appId;
if (!appId) {
const apps = await appsService.findAll();
Expand Down
5 changes: 0 additions & 5 deletions src/commands/apps/devices/delete.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defineCommand } from 'citty';
import consola from 'consola';
import { AxiosError } from 'axios';
import { isRunningInCi } from '../../../utils/ci';
import appsService from '../../../services/apps';
import { prompt } from '../../../utils/prompt';
import appDevicesService from '../../../services/app-device';
Expand All @@ -21,10 +20,6 @@ export default defineCommand({
},
},
run: async (ctx) => {
if (isRunningInCi()) {
consola.error('This command is not supported in CI environments.');
return;
}
let appId = ctx.args.appId;
if (!appId) {
const apps = await appsService.findAll();
Expand Down
1 change: 0 additions & 1 deletion src/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import axios from 'axios';
import userConfig from '../utils/userConfig';
import { API_URL } from '../config';
import { passwordPrompt, prompt } from '../utils/prompt';
import { isRunningInCi } from '../utils/ci';
import usersService from '../services/users';

export default defineCommand({
Expand Down

0 comments on commit 4ce7ea6

Please sign in to comment.