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.

File Modes Getting Lost In Software Templates

See original GitHub issue

Expected Behavior

Consider the following repo state:

$ stat -f %A test.sh
755

and the following template

apiVersion: backstage.io/v1beta2
kind: Template
metadata:
  name: bug-report
  title: bug-report
  description: Add bug report
spec:
  owner: test
  type: test

  steps:
    - id: fetch-repo
      name: Fetch repo
      action: fetch:plain
      input:
        url: 'https://github.com/asummers/backstage/tree/master'

    - id: publish
      name: Publish
      action: publish:github:pull-request
      input:
        repoUrl: 'github.com?owner=asummers&repo=backstage'
        title: 'This PR has different file permissions'
        branchName: 'script-perms'
        description: |
          This is a bug

  output:
    links:
      - url: '{{steps.publish.output.remoteUrl}}'
        text: 'Go to PR'

As I am pulling and pushing to same repo, this should result in no changes to the asummers/backstage repo whatsoever.

Current Behavior

What seems to be happening is +x (and possibly other) are being dropped along the way.

Screen Shot 2021-09-10 at 12 16 05 PM

Possible Solution

Pass along file modes faithfully.

Steps to Reproduce

See ## Current behavior

Context

This makes using software templates extremely arduous in repos with scripts with manual correction to files.

Your Environment

  • NodeJS Version (v12): v14
  • Operating System and Version (e.g. Ubuntu 14.04): OSX, Ubuntu 18.04
  • Browser Information: N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
frebencommented, Sep 10, 2021

Possibly, but this template seems to use fetch:plain rather than fetch:template so there might be another bug.

0reactions
asummerscommented, Dec 2, 2021

Never mind, we didn’t bump the plugin properly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recover lost files on Windows 10 - Microsoft Support
There are 2 basic modes you can use to recover files: Regular and Extensive. ... Recover your Documents folder from your C: drive...
Read more >
fsm.tpl Template
AutoGen5 Template -*- Mode: text -*- h=%s-fsm.h c=%s-fsm.c (setenv "SHELL" ... under the old name will not be carried forward and is likely...
Read more >
Manage files and apps with Remote Desktop - Apple Support
A client's system file permissions can be corrupted or changed from their expected values. You can manually repair permissions by returning system and ......
Read more >
Templates — NethServer 7 documentation
The template system software avoids the whole issue by using templates which ... arbitary Perl code to be embedded in a template file...
Read more >
Troubleshoot damaged InDesign documents - Adobe Support
Obtain access permissions from the owner of the file and try signing in again. Tip: Before you work on a shared file, create...
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