Runner: core.exportVariable does not set variable LD_LIBRARY_PATH value on MacOS

Created on 27 Jan 2020  路  7Comments  路  Source: actions/runner

Describe the bug
core.exportVariable does not set variable with underscores (ex. LD_LIBRARY_PATH) on macos-latest runner.
It works good on ubuntu-latest and windows-latest.
Not all variables with underscores can't be set, for example with varible ENV_VARIABLE issue does not occur.

To Reproduce
Create action and call core.exportVariable('LD_LIBRARY_PATH', 'test').
Run Actions within macos-latest runner

Expected behavior
LD_LIBRARY_PATH is set

_modified according to note_

bug

All 7 comments

Hey @SeyfSV I've been unable to reproduce this issue. Do you have a link to your run and action, or could you provide more information?

I created a custom action with the following typescript:

import * as core from '@actions/core'

async function run(): Promise<void> {
  try {
    core.exportVariable('ENV_VARIABLE', 'test')
    core.info('Ran the action')
  } catch (error) {
    core.setFailed(error.message)
  }
}

run()

Using @actions/core 1.2.2.

I then used the following workflow file

name: Test CI

on: [push]
jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macOS-latest, windows-latest]
    steps:
      - uses: thboop/typescript-action@master # your action should go here
      - run: echo $ENV_VARIABLE
        shell: bash

On all three platforms, the second step output "test" as expected.

Hi @thboop,
I am sorry, I checked issue and found that it was not clear explanation :(
Please, try to set LD_LIBRARY_PATH variable.
On my test action I get:
ubuntu:
image
macOS:
image

Action: https://github.com/SeyfSV/actions-test
Flow: https://github.com/SeyfSV/actions-env

@SeyfSV , thanks for the updated information I've been able to confirm what you are seeing! This appears to be a Runner issue related to that particular environmental variable I'm moving the ticket there so we can get it resolved!

I do not think so, because DYLD_LIBRARY_PATH and DYLD_LIBRARY_PATH_A variables have same behaviour:
MacOS:
image
Ubuntu:
image

I am going to close this issue since it looks like a limitation of macOS. 鈽濓笍apple doc above
Feel free to reopen it if you think anything we can help.

Was this page helpful?
0 / 5 - 0 ratings