Skip to content

Commit

Permalink
🧑‍💻 Add is docker env variable support
Browse files Browse the repository at this point in the history
  • Loading branch information
totigm committed Sep 1, 2022
1 parent f33ae59 commit 1c87c9d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@totigm/whatsapp-bot",
"version": "1.0.6",
"version": "1.0.7",
"description": "This is a library to create whatsapp bots. It handles all the commands stuff behind the scenes, so you can focus on your bot's logic.",
"main": "dist/index.js",
"bin": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/bot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class WhatsappBot extends Bot<Client, Message> {
},
};

const isDockerContainer = fs.existsSync("/.dockerenv");
const isDockerContainer = fs.existsSync("/.dockerenv") || process.env.IS_DOCKER_CONTAINER === "true";

const clientOptions = {
authStrategy: new LocalAuth(),
Expand Down

0 comments on commit 1c87c9d

Please sign in to comment.