Skip to content

Commit

Permalink
fix: return env vars to bundler (#16)
Browse files Browse the repository at this point in the history
## Why?

Return parsed env vars, the bundler header wasn't receiving them as the
function wasn't returning.

## How?

- Add missing return statement

## Tickets?

- no ticket

## Contribution checklist?

- [x] The commit messages are detailed
- [x] The `build` command runs locally
- [ ] Assets or static content are linked and stored in the project
- [x] You have manually tested
- [ ] You have provided tests

## Security checklist?

- [ ] Sensitive data has been identified and is being protected properly
- [ ] Injection has been prevented (parameterized queries, no eval or
system calls)

## Preview?

Optionally, provide the preview url here

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
gabrielmpinto and actions-user authored Aug 12, 2024
1 parent 6054974 commit baf342e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/functions/utils/getCodeFromPath.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as fs from 'node:fs';
import * as os from 'node:os';

// TODO: These error messages should be revised
// e.g. FleekFunctionPathNotValidError happens regardless of bundling
import {
Expand Down Expand Up @@ -45,7 +46,7 @@ const showUnsupportedModules = (args: ShowUnsupportedModulesArgs) => {
};

const buildEnvVars = (args: { env: EnvironmentVariables }) => {
Object.entries(args.env)
return Object.entries(args.env)
.map(([key, value]) => `${key}: "${value}"`)
.join(',');
};
Expand Down

0 comments on commit baf342e

Please sign in to comment.