Skip to content

Commit

Permalink
fix(environment): trailing EOL in API_PATH
Browse files Browse the repository at this point in the history
Generate and store API_PATH near _api.yml creation.
  • Loading branch information
DavidePrincipi committed Feb 19, 2025
1 parent f2b0ee7 commit 5af655f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 4 additions & 7 deletions imageroot/actions/create-module/05set_env
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#!/usr/bin/env python3
#!/bin/bash

#
# Copyright (C) 2023 Nethesis S.r.l.
# Copyright (C) 2025 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#

import agent
import os

uuid = os.popen("uuidgen")
agent.set_env('API_PATH', uuid.read())
# Placeholder, see bug NethServer/dev#7058
exit 0
3 changes: 2 additions & 1 deletion imageroot/actions/create-module/50create
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ EOF
#
# Setup APIs endpoint
#
API_PATH="$(uuidgen)"
printf "API_PATH=%s\n" "${API_PATH}" >> environment
cat <<EOF > configs/_api.yml
http:
middlewares:
ApisEndpointMw0:
Expand Down

0 comments on commit 5af655f

Please sign in to comment.