Skip to content

Commit

Permalink
Replace hasbin (closes #237)
Browse files Browse the repository at this point in the history
  • Loading branch information
logandk committed Oct 22, 2024
1 parent b892f57 commit b548d6d
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 80 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 3.0.5

## Security

- Remove hasbin dependency

## Features

- Add ability to provide function to execute when calling sls wsgi command
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const _ = require("lodash");
const path = require("path");
const fse = BbPromise.promisifyAll(require("fs-extra"));
const child_process = require("child_process");
const hasbin = require("hasbin");
const commandExists = require("command-exists");
const overrideStdoutWrite = require("process-utils/override-stdout-write");

class ServerlessWSGI {
Expand Down Expand Up @@ -137,7 +137,7 @@ class ServerlessWSGI {
}

if (this.serverless.service.provider.runtime) {
if (hasbin.sync(this.serverless.service.provider.runtime)) {
if (commandExists.sync(this.serverless.service.provider.runtime)) {
this.serverless.cli.log(
`Using Python specified in "runtime": ${this.serverless.service.provider.runtime}`
);
Expand Down Expand Up @@ -282,7 +282,7 @@ class ServerlessWSGI {
if (linkConflict) {
return reject(
`Unable to link dependency '${file}' ` +
"because a file by the same name exists in this service"
"because a file by the same name exists in this service"
);
}
}
Expand Down Expand Up @@ -498,7 +498,7 @@ class ServerlessWSGI {
// remotely, we get a string back and we want it to appear in the console as it would have
// if it was invoked locally.
//
// We capture stdout output in order to parse the array returned from the lambda invocation,
// We capture stdout output in order to parse the array returned from the lambda invocation,
// then restore stdout.
let output = "";

Expand Down
Loading

0 comments on commit b548d6d

Please sign in to comment.