-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow ng build to put files in the outdir and levels higher than the outdir #8122
Comments
This is done so that people don't overwrite their app by mistake (or a malicious app overwrites system files). I'm not sure what the proper way to fix it. Preventing mistakes is relative easy; have a flag that the user needs to specify to true. Preventing malicious apps from outputting your I'll think about a proper solution and come to it. The PR that added this check is #7778 |
@hansl I think a good compromise is a flag on the asset definition:
WDYT? |
7days ago I asked it here #7773 (comment)
"An asset cannot be written to a location outside of the output path. If you know what you're doing add |
So two points:
|
I agree on #1. There should be a check. Perhaps there is a way to allow going up the chain by writing logic that checks that the
|
Something to consider as well is that the use cases shown so far (universal, multi-apps, and translations) are all really dealing with deployment staging rather than app asset copying. The CLI doesn’t currently have a method to handle the post-build staging step so the asset configuration is being novelly used/abused to provide the functionality. |
Deployment is an entirely separate story though. I agree we need a proper solution for deployment, but it requires design and planning. This is good enough for most people in the meantime. As far as option goes, I'll try to keep a positive option instead of double negative ( |
What do you think of |
that works. I agree deployment is different than a build. But a build helps put things in the right place, so we can run them locally how we wish. I do think the CLI is a valid place to do simple copy logic like this ... once it goes beyond copying, it should be a separate thing IMO. I'm feeling this out ... trying not to introduce yet another thing into the process. I can show you sometime if that helps. |
@hansl thanks for the fix. When do you expect this to be merged? |
dammage wasn't in 1.5.0 |
Hello, could you help me use this feature please? I don't know where I'm supposed to put this " allowOutsideOutDir ". Thank you very much! |
@MaximeAnsquer Hello, you can find your answer here. |
Thank you @hansl ! |
I was wondering if you could do the same for a select number of files. This takes the whole folder with all files Could you limit it with something like: |
If I read this tread there seems to be a solution, if I check this link instead everything mentioned was discarded. Currently I have a build problem with this and CloudFoundry.
The angular build must be inside a folder that Staticfile can specify, here "folder-with-actual-angular-build-files" and not in the same folder as the configuration files. But what if... We leave the output path as it is, so in this case |
Any update on this ? |
Not yet and even then don't expect it soon. I have to say that it wasn't nice to remove the topic's feature without providing an alternative solution. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.4.4+
node: 6.11.4
os: darwin x64
Repro steps.
See the project here https://github.com/Azure-Samples/angular-cosmosdb/tree/develop in the
develop
branch.Notice that I set the outdir and root like this
Now notice I have assets that I want to end up in the folder one level higher than the
outdir
.When i run this I get an error saying I can't do this. This started in 1.4.4. It works in 1.4.3
Desired functionality.
I would like this to work so I can deploy both an express server from
src/server/**
and the client app , ending up in the outdir, where the node/express server serves everything in a folder below it. See below:Mention any other details that might be useful.
I had a chat with @Brocco about this at AngularMix ... I'm hoping we can find a way to do this where it is allowed to go up the outdir as long as it doesn't go past the project root.
The text was updated successfully, but these errors were encountered: