question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic disabling behavior ignored in CLI with pre scripts

See original GitHub issue

Given this test file:

{{
  httpRegion.metaData.disabled = true
}}

### Test 1
https://httpbin.org/status/200

Or the variant which executes before every request:

{{+
  httpRegion.metaData.disabled = true
}}

### Test 1
https://httpbin.org/status/200

Running:

httpyac --all ./requests/bugs/246.http --output short

I get the following in the CLI:

---------------------

=== Test 1 ===

GET https://httpbin.org/status/200
=> 200 (731 ms, 184 B)

I expected the request to be ignored. Not sure if I’m doing something wrong but, see the related issue regarding some interesting vscode behavior.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AnWebercommented, Apr 21, 2022

Change is released with version 5.4.0

1reaction
AnWebercommented, Apr 12, 2022

My idea was to check before each action. The alternative would be only at the position where disabled was inserted. I like the first idea better, as the second one is also easily solvable using {{ httpRegion.metaData.disabled = ...;}}.

# @disabled _disabled
<--- check for disabled
{{tokenService}}/check?token={{_token}}
<--- check for disabled
{{
  module.exports._disabled = !_token
}}

vs

# @disabled _disabled
<--- check for disabled
{{tokenService}}/check?token={{_token}}
{{
  module.exports._disabled = !_token
}}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Using LD, the GNU linker - Command Line Options
A script specified in this way augments the main linker script used for the link (either the default linker script or the one...
Read more >
Command-line API | Node.js v19.3.0 Documentation
When FORCE_COLOR is used and set to a supported value, both the NO_COLOR , and NODE_DISABLE_COLORS environment variables are ignored. Any other value...
Read more >
Windows Setup Command-Line Options | Microsoft Learn
Dynamic Update operations are performed. Disable, Dynamic Update operations are not performed. NoDrivers, Dynamic Update operations are ...
Read more >
Command: init | Terraform - HashiCorp Developer
The terraform init command initializes a working directory containing configuration files and installs plugins for required providers.
Read more >
TypeStrong/ts-node: TypeScript execution and REPL for node.js
ts-node CLI flags must come before the entrypoint script. For example: $ ts-node --project tsconfig-dev.json say-hello.ts Ronald Hello, Ronald!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found